Pointer

like pointer available in "C" language,
is anything available in progress to get the address of the variable?


Hi,

There is a function GET-POINTER-VALUE but it only works for variables of type MEMPTR. GET-POINTER-VALUE returns the physical memory address. For other type of variables there is no such function (for as far as I know)

Code:
DEFINE VARIABLE a   AS MEMPTR       NO-UNDO.
 
SET-SIZE(a) = 500. 

MESSAGE GET-POINTER-VALUE(a)
    VIEW-AS ALERT-BOX INFO BUTTONS OK.
 
It depends a bit on what it is you hope to do with a pointer.

For 4gl widgets the closest concept is a handle.
 
not to mention that 4gl memory operations are somewhat clunky.

like the fact that you pass pointers by value.

trying to pass pointer by reference almost always results in a gpf or unexpected behavior.


it'd be interesting to know more about what it is you're writing ?
 
Back
Top