LET Verb
Syntax
LET var=expr{,var=expr...}
LET strarray=strarray
LET numarray=arrayexpr{,numarray=arrayexpr...}
Description
For BBj-specific information, see LET Verb - BBj.
The LET verb assigns the value of the expression on the right of the
equal sign to the variable on the left of the equal sign. More than one
assignment can be made in a LET statement. If an error is retried, the
entire statement is re-executed.
The word "LET" is optional. When the statement is listed, PRO/5
inserts "LET".
String Array Assignment
The following is an example of the second type of syntax form and displays the assignment of a string array. The original contents of the string array, A$, are lost and are replaced with the contents of the ARRAY$ string array.
LET A$[ALL]=ARRAY$[ALL]
Matrix Operations (numeric arrays)
Copy, add, subtract, multiply, and scalar multiply matrix operations are supported. Though there are three separate syntax forms, matrix expressions as well as normal expressions may be combined in the same LET. The following matrix operations are implemented: copy, add, subtract, multiply, and scalar multiply. Unless otherwise indicated, the same matrix may be used as both an operand and the result of the operation. If the resulting matrix is not also one of the operands, it will be automatically dimensioned by PRO/5. Matrix operations may be performed on integer arrays as well as regular numeric arrays, but mixed mode is not allowed.
Examples
1000 LET A=5
1010 LET A$="TEST",B$=C$,D=F/2+56^N