This format of the @SET statement is used to assign values to string variables. This value can be the binary value of an integer variable, a line number or the name of a string variable. It is also possible to assign a string. In both cases, a new string variable is created.
Operation | Operands | F mode, L mode |
@SET | svarex {=INTERNAL {ivar | line | svar} |
svarex | String variable (#S0..#S20 ) which is to be supplied with a value. |
INTERNAL ivar | Integer variable (#I0..#I20 ) whose content is to be supplied to the string variable in binary form. The result is not usually printable. The character set is EDF041 . |
INTERNAL line | Line number which is to be assigned to the string variable as a binary value. In this case, each of the 8 digits in the line number are assigned to a half byte in binary form. The result is not usually printable. The character set is EDF041 . |
INTERNAL svar | String variable ( |
string name | String which is to be assigned to the string variable. Character set which is to be assigned to the string variable. The string |
In this statement, the statement name may be omitted entirely. In F mode, it is also permissible to omit the statement symbol.
Example
1. @SET #I0 = -2122153084 ---------------------------------------- (1) 1. @SET #S0 = INTERNAL #I0 --------------------------------------- (2) 1. @SET #S1 = INTERNAL 4081.4082 --------------------------------- (3) 1. @SET #S2 = INTERNAL #S0 --------------------------------------- (4) 1. @SET #S3 = 'ABC' ---------------------------------------------- (5) 1. @PRINT #S00.-#S03 --------------------------------------------- (6) #S00 abcd #S01 a b #S02 #S00 #S03 ABC
(1) | The value -2122153084 is assigned to the integer variable #I0 . |
(2) | The value X'81828384' is assigned to the string variable #S0 . |
(3) | The value X'40814082' is assigned to the string variable #S1 . |
(4) | The value '#S00' is assigned to the string variable #S2 . |
(5) | The value 'ABC' is assigned to the string variable #S3 . |
(6) | The string variables #S00-#S03 are output. |