Commands and Statements
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:
STOP
RUN "PAYROLL"
PRINT "Hello, world."
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:
1280 LET X=4; GOTO 4000
3000 STOP
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:
1000 CHECK_ACCOUNT: IF A$=B$ THEN GOSUB 2000
A label could be the only thing in the line:
1000 CHECK_ACCOUNT:
1010 IF A$=B$ THEN GOSUB 2000
A reference to a label may be used any place a line number reference may be used (the colon is not used).
1000 GOSUB CHECK_ACCOUNT
1010 ON X GOTO 2000,3000,ERROR_TRAP,4000,EXIT_ROUTINE
Generally, a label reference will execute just as fast as a line number reference; therefore, labels should be used to improve program readability.