Assignment - INT Pseudovariable

Purpose

Assigns a signed integer value to specified storage.

Syntax

INT(reference[, position[, length]]) =
			 expression

Parameters:

reference
A reference to connected storage; reference cannot be an array, structure, or named constant.
position
A positive integer value specifying the position of the first bit in the field.
length
A positive integer value in the range 0 – 32 specifying the length of the field.

Description

The INT pseudovariable assigns a signed integer value to specified storage. expression is converted to Fixed Bin(31). The internal representation of the resulting integer value is then assigned to the storage specified by the arguments to INT.

If position is specified, its minimum value is 1 and its maximum value is the length in bits of the storage specified by reference. If positionis omitted, the default value is 1.

If length is specified, its minimum value is 0 and its maximum value is the length in bits of the storage specified by reference, less the value of position. If length is omitted, the default value is equal to the number of bits from the bit indicated by position to the end of the storage specified by reference.

INT and POSINT are identical pseudovariables, except that POSINT assigns an unsigned integer.

The result of this pseudovariable is dependent on the native byte ordering of the hardware you are using. For this reason, the use of this function may not be portable across different platforms.

Restrictions

None.