
206
____________________________________________________________________
Flow control statement
GOTO
Branches to a specified label.
____________________________________________________________________
Syntax:
Syntax:Syntax:
Syntax:
GOTO label
Description:
Description:Description:
Description:
GOTO unconditionally transfers control to a label specified by label.
• In an IF statement block, you can omit GOTO immediately following THEN or ELSE, as
shown below.
IF a=0 THEN Lbl1 ELSE Lbl2
END IF
• GOTO allows you to branch anywhere in your program. However, you should branch only
to another line in a program module or subroutine at the same pro-gram level. Avoid
transferring control to a DEF FN block or other blocks at the different program level.
• You can use GO TO instead of GOTO.
Syntax errors:
Syntax errors:Syntax errors:
Syntax errors:
Error code and message Meaning
error 71: Syntax error
• label has not been defined.
• label is missing.
Komentáře k této Příručce