^ARG

Access a parameter as alpha

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
^ARG(position)

Arguments

position

The ordinal position of the parameter. (n)

Discussion

^ARG accesses the specified formal parameter as alpha data type (a). It is equivalent to ^ARGA.

^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) 
        .