MOVE - Character String to Integer
This MOVE instruction transfers the Logical String contents of the source character string into the destination integer variable. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
source
Required. A Character String Variable or Literal that serves as the source operand.
sep
Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.
dest
Required. An INTEGER variable that serves as the destination operand.
Flags Affected: EOS, LESS, OVER, ZERO
Note the following:
The transfer from the {source} operand begins at the Form Pointed character and continues through the Length Pointed character (i.e., the Logical String) or until {dest} is full (whichever occurs first). The {source} operand remains unchanged.
Even though INTEGERs
are stored internally in the byte order format of the machine in use, the compiler internally handles
the transfer to and from character strings to insure consistent results regardless of the machine.
Note: It is recommended that all INTEGERs be moved to a DIM
or FORM
before writing the data to disk if it is transferred between different byte order format machines. The
reverse holds true that the data should be read from disk into a DIM
or FORM then moved to the INTEGER variable.
If INTEGER data is read from disk into a DIM,
the *ABSON/*ABSOFF
controls should be used preceding and following the DIM to ensure the
transfer of non-ASCII INTEGER data. This technique ensures consistent
results regardless of the machine byte order.
The {source} string is moved in its native hex format into {dest}. If the source hex string is larger than {dest}, the most significant (high order) bytes that do not fit are lost and the EOS Condition Flag is set.
All arithmetic rules apply including rounding, truncation and setting of the ZERO, LESS, and OVER conditions.
See Also: Example Code, MOVE
![]() |