ADVANCED: ADDR

Top  Previous  Next

The ADDR operator returns the address of a VPL object. The address of an object is always a PTR type.

 

 

Example:

INCLUDE rtcu.inc
 
VAR
   a : INT; 
   b : PTR;
END_VAR;
 
PROGRAM test;
 
BEGIN
   // assign the address of 'a' to b
   b := ADDR(a);
   ...
END;
 
END_PROGRAM;