Notation Conventions

From CometWiki

Jump to: navigation, search

Notation Conventions

In general, Internet Basic statements consist of a keyword, one or more required parameters, and one or more optional parameters. The basic format of an Internet Basic statement is:

     KEYWORD required-parameter [optional-parameter]

In this documentation, Internet Basic reserved words are printed entirely in CAPITAL LETTERS. When used in a source program, reserved words may be entered in upper or lower case. For example:

     PRINT (0) "CUSTOMER MASTER REPORT"
     Print (0) "CUSTOMER MASTER REPORT"
     print (0) "CUSTOMER MASTER REPORT"

If a keyword is misspelled in a source program, it will not be recognized by the Internet Basic compiler as a reserved word. This may result in one or more errors when the program is compiled. Keywords are required in all cases where listed. Some keywords are optional (e.g., the word LET in an assignment statement, for example. In this documentation, optional keywords are enclosed in square brackets ([]).

Square brackets are also used to indicate optional parameters in Internet Basic statements. For example, one of the most frequently used parameters is the EXCP=statement-label parameter. This is used for the automatic handling of runtime exception conditions, but is an optional feature in all cases. Therefore, when the statement syntax is shown, this parameter appears inside of square brackets, as follows:

     KEYWORD required-parameter [EXCP=statement-label]

In the statement syntax sections of this documentation, words printed in lower case represent parameters to be supplied by the programmer. All such words are defined in the text of this documentation. For example, the COMMON statement (covered in the Data Division section) requires a list of variables. This list is a required parameter of the statement, and is shown:

     COMMON variable-list

Certain parameters can be repeated multiple times. The notation for this is ellipses (...). All source statement punctuation and other special characters are required when they are shown. If they are omitted, errors will occur when the program is compiled.

Commas are required as delimiters in arrays, but they are optional in all other statements.

Indentation of source statements is not required, but usually helps to define the structure of the code.

Personal tools