PRL control statement syntax
PRL is a free-form language with minimal restrictions.
It allows approximately 1200 user-defined variables. The number of allowed PRL statements is limited by the available memory. The left most word of the statement is the verb.
Conventions
To enter statements and comments
- Start each statement with the verb. Each of the PRL verbs is described in this section. PRL verbs must be written in uppercase.
- Write the PRL statements between columns 1 through 72. Characters between columns 73 and 80 are ignored.
- Use one or more blank spaces to separate the verb and parameters in a statement.
- Use indentation and blank lines to improve readability.
- Describe statements with comments. Comments are indicated by an asterisk (*) in column 1. Each comment should be on a separate line preceding the statement it describes.
- Use the END verb followed by a semicolon (END;) to indicate the end of a set of PRL verbs that specify an IF-THEN-BEGIN branching routine. Place each verb on a separate line for readability.
To terminate execution
Use the END verb to terminate PRL execution.
To use labels
Use labels to direct program flow to another statement. Labels are used inthe following ways:
- with GOTO statements
- must be unique within the PRL program
- should be on a separate line
- can start in any column
- can be any length
- can have special characters but no blank characters
- must end with a colon (:) sign
To specify a literal
Enclose a literal in single quotation marks to distinguish it from a variable.
To specify a variable
Begin each variable with an alphabetic character; remaining characters for the variable can be alphanumeric. All variables must be eight characters or less. Predefined variables must be written as shown.
In addition, put an ampersand (&) sign in front of a variable used within a quoted literal. If an & does not precede any characters enclosed in quotation marks, all characters are processed as literals. For example, the following specification sets V3 to ABCDEF:
SET V1 = 'ABC'SET V2 = 'DE'SET V3 = '&V1&V2.F'
If the last statement in this example used 'V1V2.F', V3 would be set to V1V2.F. (See SET-assign-a-value.)
To concatenate variables and literals
Use a period to concatenate a variable to a literal within single quotes.
To assign a numeric value to a variable
Use a decimal point, a sign, or commas (no blank characters) with a number used in an expression or assigned as a value to a variable, as described in SET-assign-a-value.
The numeric value is not enclosed in single quotation marks. An example follows:
SET DAYS = 7
To specify a substring
Use (start- n :length- n) to select a portion of a character string, as described in Substrings.
Start-n specifies the number of characters from the beginning of the string. Length- n is the length of the substring. The numerics must be delimited with a colon and enclosed in parentheses, such as (4:2), which counts to the fourth character of a string and limits the substring to two characters.
To continue the USING or PRINT statement
If necessary, use a minus (-) sign to continue the USING and PRINT statements one line to another line.
Related topic