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.

$ZUTIL(55)$ZUTIL(55)Returns or changes the current language mode.$ZUTIL(55,n)ParametersnOptional — A numeric code specifying what language mode to set.DescriptionUse this form of $ZUTIL to examine or change the current language mode.To return the current state of the language mode switch without changing it, issue $ZUTIL(55)without the n parameter, as follows:WRITE $ZUTIL(55)To change the language mode, issue $ZUTIL(55,n). This changes the language mode andreturns the previous language mode value.You can use $ZUTIL(55) to change the language mode at the programmer prompt. (Use thecomplete $ZUTIL spelling, as the $ZU abbreviation is not valid in all language modes.)When <strong>Caché</strong> executes a routine, it automatically changes the language mode to the routine'slanguage mode. A DO command or a $$ extrinsic function temporarily changes the languagemode to that of the called routine. <strong>Caché</strong> then restores the previous language mode when theroutine terminates. Therefore, you need not (and cannot) change the language mode duringruntime execution of a routine.The ZLOAD command changes the language mode to the loaded routine's language mode.However, ZLOAD does not restore the previous language mode upon termination of theroutine. One use of $ZUTIL(55) is to set the language mode following a ZLOAD operation.$ZUTIL(55) can change the process' language mode at any time. However, when executinga routine you should only do this under XECUTE, and restore before leaving the XECUTEoperation. This technique is commonly used to set language mode when compiling a routine.The object code (tokens, mcode, etc.) for a routine is generated at compile time according tothe language mode in effect at that time. This language mode determines the routine's runtimebehavior, except for a few cases where language mode is tested at runtime.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 591

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

Saved successfully!

Ooh no, something went wrong!