Language Structure

IB Statements

File System

Comet 32 Runtime


Procedure Division Overview

The Procedure Division of an Internet Basic program is the place where the executable logic steps are written. This program section includes statements to input and output data, control data files and devices such as printers and terminals, assign values to data variables, establish program loops, test logical and relational conditions, etc.

See Statement Summary.

The general syntax of statements in the Procedure Division is:

  statement-label KEYWORD parameters
The statement-label may be used to define statements in this part of the program that are used as branch-to points, such as subroutines, exception routines, beginning of program sections, etc. Statement-labels are not required on every statement in this section, just those that will be used as branch-to points.

Statement-labels may be numeric or alphanumeric. Numeric labels may be one to four digits long, while alphanumeric labels may be up to 32 characters long. Alphanumeric labels, when defined, are followed by a colon (:), but the colon is not used when the statement-label is referred to from another part of the program.

The KEYWORD refers to the Internet Basic statement being used (e.g., PRINT, INPUT, IF, CLOSE, RUN, GOTO), and parameters refers to the items that typically accompany and Internet Basic keyword (e.g., data values, statement labels, format labels, program names).


1000  PRINT (0,100)
      INPUT (0) CUSTNUM$
      GOTO 1000
Here, the statement label 1000 is used to identify the beginning of a loop section in the program.