Name Indirection

Indirection may replace the prefix of a subscripted global or local variable name. This "name" indirection requires two indirection operators, a leading operator similar to the other forms of indirection, and a trailing operator marking the transition to those subscripts that are not specified by indirection.

Example:

       GTM>SET from="B",to="^A(15),x=""
       GTM>FOR SET x=$O(@from@(x)) Q:x="" S @to@(x)=@from@(x)
        

This example uses name indirection to copy the level contents of a local array to a part of a global array. The example assumes that all existing first level nodes of variable B have data.