Commands and Statements
Description
A single command to PRO/5 is given in the form of a statement. Every statement begins with a VERB. The verb instructs PRO/5 to perform some action that is usually performed within the workspace. Some verbs require additional information to further define the action to be performed. This additional information is supplied in syntactical elements which simply follow the verb, such as literal values, variables, file names, etc. The Commands Manual describes each verb recognized by PRO/5.
Some examples of statements:
|
Maximum Command Length
A command has a maximum length of 511 bytes.
Lines and Compound Statements
A line consists of a line number followed by an optional label and one or more statements. When typing in a line to PRO/5, end the line with a carriage return. A line number may be any integer from zero (0) through 65534. If no line number is explicitly typed, PRO/5 assumes it is line 0. Line 0 is a special case. This line is executed immediately. If the line contains more than one statement, it is called a compound statement. The statements within a compound statement must be separated by semicolons. PRO/5 executes statements left to right within a compound statement. Some examples of lines:
|
Line Labels
A line in PRO/5 may optionally have a label following the line number. A label can be up to 32 characters long. A label must begin with A-Z and can contain letters, digits, or underscores "_". A colon ":" terminates the label. For example:
|
A label could be the only thing in the line:
|
A reference to a label may be used any place a line number reference may be used (the colon is not used).
|
Generally, a label reference will execute just as fast as a line number reference; therefore, labels should be used to improve program readability.