Difference between revisions of "Goto"
From Lazarus wiki
Jump to navigationJump to searchLine 1: | Line 1: | ||
{{goto}} | {{goto}} | ||
− | + | ||
− | '''Goto''' is an unconditional jump to a previously declared [[label]] (either before or after the goto command). | + | '''Goto''' is an unconditional jump to a previously declared [[Label|label]] (either before or after the goto command). |
<br> | <br> | ||
Example for the declaration of a label and use of goto: | Example for the declaration of a label and use of goto: | ||
Line 20: | Line 20: | ||
end; | end; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | |||
+ | |||
[[category:Pascal]] | [[category:Pascal]] | ||
[[Category:Control Structures]] | [[Category:Control Structures]] |
Revision as of 20:37, 16 October 2015
│
Deutsch (de) │
English (en) │
français (fr) │
русский (ru) │
Goto is an unconditional jump to a previously declared label (either before or after the goto command).
Example for the declaration of a label and use of goto:
var
fWaterIsBoiling: Boolean;
label
SwitchOffKettle;
begin
...
if fWaterIsBoiling = True then Goto SwitchOffKettle;
...
SwitchOffKettle:
...
end;