Writes an INTEGER or INT64 value as a 32-bit unsigned
value to a MEMPTR or RAW value. This statement is analogous to the PUT-UNSIGNED-SHORT
statement, except with a 32-bit value.
Syntax
PUT-UNSIGNED-LONG ( destination , position ) = expression
|
-
destination
- A MEMPTR or RAW variable. If destination is
the Unknown value (?), it remains the Unknown value (?).
If destination is a MEMPTR and its region is
not allocated (by a SET-SIZE statement, or by a Windows DLL or Unix
shared object entry point), the AVM generates a run-time error.
-
position
- An INTEGER or INT64 value greater than 0 that indicates the
byte position to write expression. If position is
less than 1, the AVM generates a run-time error. For a RAW destination,
if position is greater than the length of destination,
the AVM increases the length of destination to position plus the
remaining bytes needed to store expression. The
gap between the original destination length and position is
padded with null bytes. For a MEMPTR destination,
if position is greater than the length of destination or
does not leave sufficient room to store expression,
the AVM generates a run-time error.
For a RAW destination,
if position is greater than the length of destination,
the AVM increases the length of destination to position plus the
remaining bytes needed to store expression. The
gap between the original destination length and position is
padded with null bytes.
For a MEMPTR destination,
if position is greater than the length of destination or
does not leave sufficient room to store expression,
the AVM generates a run-time error.
-
expression
- An INTEGER or INT64 value of a constant, field, variable or
expression. If expression is an INT64 value exceeding
the maximum value of an UNSIGNED-LONG, the AVM generate an overflow
error at run time.
Notes
- This
statement supports byte-swapping only if destination is
a MEMPTR data type. The statement will first examine the byte-order
setting of the MEMPTR and then swap the bytes appropriately while
putting the data into the MEMPTR memory.
- For more information on accessing DLL routines from ABL, see OpenEdge
Development: Programming Interfaces.