Progress
External Program
Interfaces


Defining and Initializing MEMPTR Variables

As with any 4GL variable, you define a MEMPTR variable using the DEFINE VARIABLE statement. Unlike most other data types, MEMPTR variables also have two other features that you must initialize to use them for socket communications:

Before you can read or write to a MEMPTR variable, you must set the size of memory reserved for it, in bytes, using the 4GL SET-SIZE statement. Depending on your data and application, you might also have to specify the byte order for reading and writing.

Generally, when writing and reading data on a socket, the client and server must agree on the byte order so Progress can consistently interpret, on both ends, the order of bytes that comprise each data type stored in the MEMPTR region. Thus, the MEMPTR data type supports the SET-BYTE-ORDER statement and the GET-BYTE-ORDER function to set and get the byte order for a MEMPTR variable. For more information, see Introduction."


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