RAW function
- Last Updated: January 18, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
(ORACLE only)
Extracts bytes from a field.
Syntax
|
- field
- Any field from which you want to extract bytes.
- position
- An integer expression that indicates the position of the first byte you want to extract from field. The default value of position is 1.
- length
- An integer expression that indicates the number of bytes you want to extract from field. If you do not use the length argument, RAW uses field from position to end.
Example
This
procedure extracts bytes from the Name field of the
first Customer, starting at byte 8, and writes 4 bytes to the variable r1:
r-rawfct.p
|
Notes
- If position is less than 1, or length is less than 0, the AVM returns a run-time error.
- If (position +length -1) is greater than the length of the field from which you are extracting the bytes, the AVM returns a run-time error.
See also
GET-BYTE function, LENGTH statement, PUT-BYTE statement, RAW statement