User Tools

Site Tools


address_return_memory_address_.htm
Navigation:  Language Reference > 13 - Built-in Functions > ====== ADDRESS (return memory address) ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

ADDRESS(| variable | )

blk2blue.jpg

ADDRESS Returns memory address of a variable.
variable The label of a data item or PROCEDURE.

The ADDRESS procedure returns the address of the specified data item or PROCEDURE.

The ADDRESS procedure allows you to pass the address of a variable or procedure to external libraries written in other languages, or to reference assign the address to a reference variable.

Return Data Type: LONG

Example:

MAP
 ClarionProc                     !A Clarion language procedure
 MODULE('External.Obj')          !An external library
  ExternVarProc(LONG)            !C procedure receiving variable address
  ExternProc(LONG)               !C procedure receiving procedure address
 END
END
Var1 CSTRING(10)                  !Define a null-terminated string
CODE
ExternVarProc(ADDRESS(Var1))     !Pass address of Var1 to external procedure
ExternProc(ADDRESS(ClarionProc)) !Pass address of ClarionProc
ClarionProc PROCEDURE             !A Clarion language procedure
CODE
RETURN

See Also:

PEEK

POKE

Reference Assignment Statements

INSTANCE

address_return_memory_address_.htm.txt · Last modified: 2021/04/15 14:35 by carlbarnes