Unitary | Pre-APOGEE | APOGEE | BACnet | PXC.A |
---|---|---|---|---|
● | ● | ● | ● | ● |
Syntax
GOTOline#
line# | The next line number to which execution is directed. - Line numbers must be entered as integers ranging from 1 to 32767. |
Use
This command is used to control program execution by branching to a different section of the program.
Example
10 IF (FANRUN.GE.1000) THEN GOTO 50
Notes
- A GOTO command should only transfer program control to the same or a sequentially higher line number.
- If the line number indicated in the GOTO does not exist, execution is transferred to the next line after the line number specified in the GOTO command.
- A GOTO command should not transfer program control to a comment line.
- Do not use the GOTO command to transfer control to the top of a program. If the last program line is missed because of this, time-based commands (LOOP, WAIT, etc.) will not function properly.