Introduction

Language Structure

IB Statements

File System

Comet 32 Runtime

Index

Statement Labels

Some Internet Basic statements employ statement labels that are a part of the Internet Basic source statement.

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

Numeric labels may contain up to four digits (e.g., 1, 10, 100, 1000). The Internet Basic compiler treats numeric labels as a string of characters, rather than as a numeric value. This means that labels such as 1, 01, 001, and 0001 are all different from each other.
Alphanumeric labels

Alphanumeric labels must begin with a letter and end with a colon (:) when being defined (other references do not include the colon). Characters following the first one may be alphabetic or numeric. No special symbols or blanks are allowed in statement labels.

Alphanumeric labels may be any length, but the first 32 characters must be unique within a single source program.

Example 1:

Label    Statement
==================================================
SCREEN:  FORMAT "THIS IS AN I/O FORMAT STATEMENT."
.
.
.
START:   PRINT (0,SCREEN)
.
.
.
         GOTO START
Example 2:
Label       Statement
===================================
TOP:    PRINT (0) (EN);(CS)
.
.
READLOOP:
        READ (1,CUSTFILE) EXCP=8000
        PRINT (2,PRINTER) EXCP=9000
.
.
        GOTO READLOOP