Error: {function} can’t take the private variable ‘{name}’
The call passes a private variable to $NAME, $QUERY or $ZORDER, or one without
subscripts to $ORDER or $ZPREVIOUS. In a procedure block, such as a method, formal
arguments and local variables are private. A variable is public if it starts with % or the
public list names it. IRIS refuses to compile the call
(ERROR #1038: Private variable not allowed). Add the variable to the method’s
PublicList, or use a global.
IRIS rejects the example.
Class Demo.PrivateVariableNotAllowed
{
ClassMethod Path() As %String
{
Set data("a", 1) = "x"
Quit $NAME(data("a", 1)) //! A3485
}
}