<!--
UCSD Pascal System II.0 User Manual
Copyright (C) 1979 Regents of the University of California
HTML markup and formatting
Copyright (C) 2006, 2007, 2010 Peter Miller
-->
<p>
<#include reconstruct/page "page046" "46">
<blockquote>
<b>Figure 3.8</b>
<hr><pre>PROGRAM STRING1;
BEGIN
WRITE('TOO WISE 0;
WRITE('YOU ARE');
WRITELN(','); (* <i>Cursor finishes in this line</i> *)
WRITELN('TOO WISE ');
WRITELN('YOU BE.')
END. (* <i>Cursor starts in this line</i> *)</pre><hr>
</blockquote>
<p>
Example 3: On the first find we type “F/WRITE/”. This locates
the first “<tt>WRITE</tt>”.
Now typing “FS” will make the prompt line flash:
<blockquote>
<pre>>Find[1]: L)it <target> =>S</pre>
</blockquote>
and the cursor will appear at the second WRITE.
<p>
<a name="commandr"></a>
<b>Replace</b>
<p>
REPLACE mode is reached by typing “R” while at the Edit level.
On entering REPLACE mode one of the two prompt lines in Figure 3.9
appears. In this example, a <repeat-factor> of four is assumed.
<blockquote>
<b>Figure 3.9</b>
<a name="literal.38"></a>
<a name="verify.39"></a>
<a name="token.40"></a>
<hr><pre>>Replace[4]: L(it V(fy <targ> <sub> =>
>Replace[4]: T(ok V(fy <targ> <sub> :></pre><hr>
</blockquote>
<p>
Example 1: Type “RL/QX//YZ/” which make the prompt line appear as:
<blockquote>
<pre>>Replace[1]: L)it V)fy <targ> <sub> =>L/QX//YZ/</pre>
</blockquote>
This command will change: “<tt>VAR SIZEQX: INTEGER;</tt>“ to
“<tt>VAR SIZEYZ: INTEGER;</tt>”.
Literal mode is necessary because the string QX is
not a token but is part of the token <tt>SIZEQX</tt>.
<p>
Example 2: In Token mode REPLACE ignores spaces between tokens
when finding patterns to replace. For example, using the lines on the
left hand side of Figure 3.10 and typing: “2RT/(',')/.LN.”
The prompt line should appear as:
<blockquote>
<pre>>Replace: L)it V)fy <targ> <sub> =>/(',')/.LN.</pre>
</blockquote>