^ARG

Access a parameter as alpha

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
^ARG(position)

Arguments

position

The ordinal position of the parameter. (n)

Discussion

^ARG accesses the specified formal parameter as alpha data type (a).

^ARG is a positional parameter reference and cannot be present in a main routine. In Synergy .NET, the specified parameter must be a descriptor type.

When ^ARG is used, the parameters do not have to be defined in the subroutine parameter block.

Note

Using ^ARG* on declared arguments can cause high overhead.

Examples

subroutine sub
    arg1        ,a              ;Optional parameter
    arg2        ,a              ;Optional parameter
    arg3        ,a              ;Optional parameter
record
    i           ,d2
proc
    for i from 1 thru %numargs
      if (^passed(^arg(i)))
        .
        .  process parameter(i) 
        .