Progress
Language Reference


GET-BYTES Function

Interfaces
OS
SpeedScript
All
All
Yes

Returns the specified number of bytes, from the specified location, into a RAW or MEMPTR variable.

SYNTAX

GET-BYTES( source , position , numbytes ) 

source

An expression that evaluates to a RAW or MEMPTR value that indicates the source location. If source is the unknown value, GET-BYTES returns the unknown value.

position

An integer value greater than 0 that indicates the byte position of the first byte to get. If position is greater than the length of source, Progress returns the unknown value. If position is less than 1, Progress generates a runtime error.

numbytes

An integer value greater than 0 that indicates how many bytes to return as a RAW value. If position plus numbytes is greater than the size of source, Progress returns the UNKNOWN value.

If the variable that accepts the returned data is a RAW variable and numbytes is greater than its length but less than or equal to 32K, Progress increases the size of the variable to numbytes.

If either the source location, source, or the variable that accepts the returned data is a RAW value, and numbytes is greater than 32K, Progress generates a runtime error.

If the variable that accepts the returned data is a MEMPTR variable and numbytes is greater than its length, Progress generates a runtime error.

SEE ALSO

PUT-BYTES Statement


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095