<A NAME=GOTO>
<TITLE>GOTO</TITLE></A>
<b><a href=r37_idx.html>INDEX</a></b><p><p>
<B>GOTO</B> _ _ _ _ _ _ _ _ _ _ _ _ <B>command</B><P>
<P>
Inside a <em>begin</em>...<em>end</em>
<A HREF=r37_0041.html>block</A>, <em>goto</em>, or
preferably, <em>go to</em>, transfers flow of control to a labeled statement.
<P> <H3>
syntax: </H3>
<P>
<P>
<em>go to</em><labeled_statement> or <em>goto</em> <labeled_statement
>
<P>
<P>
<P>
<labeled_statement> is of the form <label> <em>:</em><statement
>
<P>
<P>
<P> <H3>
examples: </H3>
<P><PRE><TT>
procedure dumb(a);
begin scalar q;
go to lab;
q := df(a**2 - sin(a),a);
write q;
lab: return a
end;
DUMB
dumb(17);
17
</TT></PRE><P><em>go to</em>can only be used inside a <em>begin</em>...<em>end
</em>
<A HREF=r37_0041.html>block</A>, and inside
the block only statements at the top level can be labeled, not ones inside
<em><<</em>...<em>>></em>,
<A HREF=r37_0228.html>while</A>...<em>do</em>, etc.
<P>
<P>
<P>