Silverfrost Logo About Us | Contact Us
 

GOTO

Any statement can be given a label in the form of an integer constant in the range 1 to 99999. A label must appear at the beginning of a line. It can have spaces before it and must have at least one space after it and before the statement. A line that is a continuation must not be labeled.

The form for the GOTO statement is:

GOTO label

GOTO statements should only be used in exceptional circumstances. For example:

  1. To exit from deeply nested flow constructs.

  2. To jump to one of a number of terminating error conditions at the end of a program or procedure.

Wherever possible, use an IF construct in preference to GOTO statements.

 

 

Copyright © 1999-2017 Silverfrost Limited