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.

$ZREFERENCESET ^["samples"]a(1,1)="Hello"SET ^(2)=" world!"WRITE $ZREFERENCEQUITreturns:^["SAMPLES"]a(1,2)The following example returns the last global reference. In this case, it is ^a(1), used as anargument to the $LENGTH function:SET ^a(1)="abcdefghijklmnopqrstuvwxyz"SET ^b(1)="1234567890"SET x=$LENGTH(^a(1))WRITE $ZREFERENCEQUITThe following example returns the value set for $ZREFERENCE as if it were the last globalreference. In this case, it is ^a(1,1).SET ^a(1,1)="abcdefghijklmnopqrstuvwxyz"SET ^b(1,1)="1234567890"WRITE !,^(1); Naked reference uses last globalSET $ZREFERENCE="^a(1,1)"WRITE !,$ZREFERENCEWRITE !,^(1); Naked reference uses $ZREFERENCE; value, rather than last global.The following example sets an extended global reference. Note the doubled quotation marks:KILL ^xWRITE !,$ZREFERENCESET $ZREFERENCE="^[""samples""]a(1,2)"WRITE !,$ZREFERENCESee Also• ZNSPACE command• $ZUTIL(5) Display or Switch Namespace function• $ZNSPACE special variable• Configuring Namespaces in <strong>Caché</strong> System Administration Guide• Global Structure in Using <strong>Caché</strong> Multi-Dimensional Storage• Naked Global <strong>Reference</strong> in Using <strong>Caché</strong> Multi-Dimensional Storage<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 487

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

Saved successfully!

Ooh no, something went wrong!