Introduction | Language Structure | IB Statements | File System | Comet 32 Runtime | Index |
Format statement labels are required for every FORMAT statement, while statement labels in the Procedure Division are used only for statements that are logical branch points in the program (e.g., subroutines, exception routines, branch-to routines).
The Internet Basic compiler views format labels and statement labels in two distinct groups. Therefore, it is possible to use the same label in both the I/O Format Division and the Procedure Division.
Labels may be numeric or alphanumeric.
Numeric labels
|
Alphanumeric labels
|
Example 1:
Label Statement ================================================== SCREEN: FORMAT "THIS IS AN I/O FORMAT STATEMENT." . . . START: PRINT (0,SCREEN) . . . GOTO STARTExample 2:
Label Statement =================================== TOP: PRINT (0) (EN);(CS) . . READLOOP: READ (1,CUSTFILE) EXCP=8000 PRINT (2,PRINTER) EXCP=9000 . . GOTO READLOOP