Previous Next

PUT-BYTES statement
Copies a RAW or MEMPTR variable to the specified location in another RAW or MEMPTR variable.
Syntax 
 
PUT-BYTES ( destination , position ) = expression 
destination
An expression that returns a target RAW or MEMPTR variable. If destination is the Unknown value (?), PUT-BYTES does nothing.
position
An integer value greater than 0 that indicates the byte position where you want to put the data. If position is less than 1, the AVM generates a run-time error.
For a RAW variable, 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 variable, 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. If destination is a RAW and position plus the length of expression is greater than 32K, the AVM generates a run-time error.
expression
An expression that returns a RAW or MEMPTR variable.
See also 
GET-BYTES function, LENGTH function, LENGTH statement, RAW function, RAW statement, SET-SIZE statement

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.