Introduction

Language Structure

IB Statements

File System

Comet 32 Runtime

Index

Format item

A format-item is a string or numeric field (constant or variable), or device control code in a FORMAT statement.

Example 1:
1000 FORMAT (CS)
.
PRINT (0,1000)
In this example, the FORMAT statement contains one device control code, the (CS) mnemonic which means "clear screen." This FORMAT statement is invoked via the PRINT statement.

Note: The above example could also be written without a FORMAT statement, as follows:

PRINT (0) (CS)
Example 2:
LABEL: FORMAT CUSTNUM$
.
INPUT (0,LABEL)
In this example, the FORMAT statement contains a string variable named CUSTNUM$. This FORMAT statement is invoked via the INPUT statement.

Note: The above example could also be written without a FORMAT statement, as follows:

INPUT (0) CUSTNUM$
Example 3:
LABEL: FORMAT CUSTNUM$;NAME$;ADDRESS$;CITY$;STATE$;ZIP$;PHONE$
.
INPUT (0,LABEL)
In this example, the FORMAT statement contains multiple string variables. This format statement is invoked via the INPUT statement.

This example presumes that the video screen has been formatted prior to the INPUT statement, with the screen format including the necessary foreground and background areas, transmit marks, etc.