var
A quoted string, or expression that evaluates to a string, which specifies a variable. It can be a local variable, a process-private global, or a global variable.
If the string is a global reference, var can specify an extended global reference by including a namespace name. Because var is a quoted string, the quotes around a namespace reference must be doubled to be parsed correctly as literal quotation marks. For example, "^|""SAMPLES""|myglobal(1,4,6)". The same applies to the quotes in a process-private global with "^" syntax. For example, "^|""^""|ppgname(3,6)". $QLENGTH does not check whether the specified namespace exists or whether the user has access privileges for the namespace.
A var must specify a variable name in canonical form (a fully expanded reference). To use $QLENGTH with a naked global reference, or with indirection, you can use the $NAME function to return the corresponding fully expanded reference.