Previous: For Statement To the Table of Content Next: If Statement

- 2.2.9.5 -
TMT Pascal Language Description
Pascal Language Structure
Statements

Goto Statement

As mentioned above statements may be preceded by labels. The goto statement transfers control to a specific label.
The format of a goto statement is as follows:
  goto label;
where label has been previously declared in the current block. The following is an example of the goto statement:
label GotoLoop;
var
  i: Integer;
begin
  i := 1;

GotoLoop:

  WriteLn(i);
  Inc(i,2);
  if i < 100 then goto GotoLoop;
end.



Previous: For Statement To the Table of Content Next: If Statement
For Statement Table of Content If Statement

- 2.2.9.5 -