Naked ReferencesΒΆ
Material prepared from M Programming Book [WALTERS1997]
Page 154-155
A naked reference is a shortcut to lazily access the last used global variable. By specifying a carat (^) immediately before an open parenthesis (() a naked reference is declared to the last used global variable without the last subscript specified. For example,:
^X(42)
^(43)
would be equilvalent to:
^X(42)
^X(43)
In the case where there is no last used global variable, an error will be thrown.
The last used global variable can be modified on the same line or by functions executed earlier in the line. As such, using naked references can be a dangerous proposition as well as a non-clear syntax. Avoiding their use is heavily advised.