The standard does not provide for indirection of a labelref because the syntax has an ambiguity.
Example:
DO @X(1)
This example could be:
An invocation of the label specified by X with a parameter of 1.
An invocation of the label specified by X(1) with no parameter list.
GT.M processes the latter interpretation as illustrated in the following example.
Example:
The syntax:
SET A(1)="CUBE",X=5 DO @A(1)(.X) WRITE X,! QUIT CUBE(C);cube a variable SET C=C*C*C QUIT
Produces the result:
125
GT.M follows analogous syntax for routine indirection:
DO ^@X(A) invokes the routine specified by X(A).
DO ^@(X)(A) invokes the routine specified by X and passes the parameter A.
DO ^@X(A)(A) invokes the routine specified by X(A) and passes the parameter A.