STORE
ANSI
The STORE instruction transfers the contents of a variable to a list item, based on an index. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
source
Required. A previously defined Character String Variable, Numeric Variable, or Literal that is moved into the selected {dest} variable.
sep
Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.
index
Required. A previously defined Numeric Variable or Expression indicating the {dest} variable selected.
dest
Required. A previously defined Character String Variable, a Numeric Variable, a list of string and/or numeric variables, or a VARLIST of string and/or numeric variables that receives the {source} value.
Flags Affected: EOS, LESS, OVER, ZERO
Note the following:
The value of {index} designates that item in {dest} is to receive the transfer from the {source} operand. The transfer is a MOVE ({source} type to list item type) process and all rules concerning a MOVE of this type apply.
Only the integer portion of {index} is used (i.e., 6 for 6.99).
If the value of {index} is greater than or less than the number of items in {dest}, the instruction is ignored. The first item in {dest} would require an {index} value of 1, the second item a value of 2, the third item a value of 3 and so on.
{dest} has no limit on the number of Data Definition Labels that may be specified. The list may be continued on additional lines by terminating each continued line with a colon (:) in place of the comma between the last list item on the continued line and the first list item on the new line.
Null entries in the list are allowed and are signified by two commas with no variable name between them. When the {index} value is associated with a null entry no STORE operation is performed, the same as when the index value is out of range or invalid.
See Also: Example Code, LOAD, Character String Instructions
![]() |