Returns the unsigned 1 byte value at the specified memory location as an INTEGER value.
In this example, the RAW function goes to the Customer field in the non-OpenEdge database. The GET-BYTE function accesses the first byte and stores the integer value of that byte in the variable ix. The procedure then tests the value, if the integer value is 83 (the character code value for S), the AVM displays the Customer Name.
r-rawget.p
/* You must connect to a non-OpenEdge database to run this procedure */ DEFINE VARIABLE ix AS INTEGER NO-UNDO. FOR EACH Customer: ix = GET-BYTE(RAW(Customer.Name), 1). IF ix = 83 THEN DISPLAY Customer.Name. END. |
The next procedure sets up a MEMPTR region with a character string and uses the GET-BYTE function to display the character code value of each character in the string:
r-mptget.p