^REF
WTSupported in traditional Synergy on Windows
|
|
USupported on UNIX
|
VSupported on OpenVMS
|
^REF(expression)
or
^REF(argument) ,typesize
Arguments
expression
An argument to pass by reference. (a or n)
argument
An argument declared as type reference. (a or n)
typesize
The data type and size specification.
Discussion
^REF is used to pass an argument by reference or to declare an argument as type reference.
The result of expression is passed by reference, which means that the address of the data associated with the argument is passed by value.
^REF is primarily used to pass arguments to C routines. If you use ^REF when passing arguments to Synergy DBL routines, the corresponding parameters in the Synergy DBL routines must be declared as type ^REF with any valid data type.
Use the second syntax for ^REF to declare a subroutine parameter. Type n is not allowed.
Do not use ^REF on an automatically sized integer field. |
Examples
record text ,a8, "The Text" proc xcall sub(^ref(text)) ;Pass argument by reference end subroutine sub ^ref(a_arg) ,a8 ;Receive argument by reference as a8 proc open(1, o, "TT:") writes(1, a_arg) close 1 xreturn endsubroutine