|
FORMAT
The FORMAT statement is used to declare user-defined variables and to override the default format of system variables.
FORMAT (<format-name>) variable1 variable2 ... ;
The format name must be one of the available 19 GPP formats, defined earlier in this document (For example, CHARACTER, COORDINATES, etc.). It must be enclosed in parenthesis. Any number of variables may be specified in one statement, separated by spaces. As with any statement, it is terminated with a semi-colon (;).
If the statement specifies a new user-defined variable, it is created by GPP. If the statement specifies an existing system or user-defined variable, it only changes the format of this variable.
Each time a FORMAT statement is executed, it also sets the variable type - string for CHARACTER format and numeric for all other formats.
Arrays may also be defined with the FORMAT statement by specifying the number of members in the array (a constant integer number must be used).
Example
FORMAT (USER_1) X Y Z; // creates 3 variables with USER_1 format
FORMAT (COORDINATES) X_CURPOS; // redefine format of system variable
FORMAT (REAL) Queue1[100]; // create an array with 100 members
|