11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

$QSUBSCRIPTCode< -1-10nReturn ValueGenerates a error; these numbers are reserved for futureextensions.Returns the namespace name if namevalue includes one; otherwise, returnsthe null string ("").Returns NAME without the namespace name, even if one is present.Returns the subscript value denoted by s n .Returns the null string ("").ExamplesThe following example returns $QSUBSCRIPT values when namevalue is a subscriptedglobal with one subscript level and a specified namespace:SET global="^|""account""|%test(""customer"")"WRITE !,$QSUBSCRIPT(global,-1) ; accountWRITE !,$QSUBSCRIPT(global,0) ; ^%testWRITE !,$QSUBSCRIPT(global,1) ; customerWRITE !,$QSUBSCRIPT(global,2) ; null stringThe following example returns $QSUBSCRIPT values when namevalue is a process-privateglobal with two subscript levels. The $ZREFERENCE special variable contains the nameof the most recently referenced variable.SET ^||myppg(1,3)="apples"WRITE !,$QSUBSCRIPT($ZREFERENCE,-1) ; null stringWRITE !,$QSUBSCRIPT($ZREFERENCE,0) ; ^||myppgWRITE !,$QSUBSCRIPT($ZREFERENCE,1) ; 1WRITE !,$QSUBSCRIPT($ZREFERENCE,2) ; 3See Also• $QLENGTH function• $ZREFERENCE special variable• Global Structure in Using <strong>Caché</strong> Multi-Dimensional Storage<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 289

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!