MOVE - Numeric Field to Integer


 

This MOVE instruction converts the contents of the numeric source into an integer compatible format and then places it in the destination integer variable. The instruction uses the following format:

 

 

[label]

MOVE

{source}{sep}{dest}

 

Where:

label

Optional. A Program Execution Label.

source

Required. A Numeric 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 NTEGER variable that serves as the destination operand.

Flags Affected: EOS, OVER

Note the following:

  1. The contents of the {source} are rounded before transfer to {dest} but the {source} remains unchanged.

  2. The contents of the {source} are converted into an equivalent hex value and then moved into {dest}. If the hex value is larger than {dest}, the most significant (high order) bytes that do not fit are lost and the EOS Condition flag is set.

  3. See Note 2 under MOVE - Character String to Integer for information regarding storage of INTEGER variables on various systems.

  4. The maximum values that may be represented by an INTEGER is as follows:

  5.  

    Integer Size

    Maximum Value

    1

    255

    2

    65,535

    3

    16,777,215

    4

    4,294,967,295

 

 

See Also: Example Code, MOVE

 



PL/B Language Reference MOVE - Numeric Field to Numeric Field MOVE - Integer to Character String