Statement Continuation

From CometWiki

Jump to: navigation, search

Statement Continuation

The Internet Basic compiler reads up to 132 characters per source line. If you need to write a statement longer than this, use the underline character (_) at the end of the source line to continue the statement on the following editor line. The underline character signals the Internet Basic compiler that the current statement is being continued on the following source line.

There is no limit to the number of lines that may be joined using the underline continuation character.

Notes:

The underline character can be used in all divisions of an Internet Basic source program. Any characters following the underline character will be ignored by the Internet Basic compiler. These superfluous characters are treated as remarks and not compiled into the object program. If you are writing your source programs with the legacy Comet Editor (CED) program, the maximum line length is 80 characters. Also see Underscore and ampersand.

Example:

DATA: FORMAT PARTNUM$;_
            DESC$;_
            QTYHAND;_
            QTYORD;_
            QTYCOMM;_
            AVAIL;_
            LOCATION$;_
            VENDOR$_

In this example, a FORMAT statement is continued to several source lines (and indented on the secondary lines for readability purposes only).

Personal tools