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.

The %ZLANG Language Extension LibraryThe %ZLANG language extension library cannot be used to override, modify, or disable anystandard feature of <strong>Caché</strong> <strong>ObjectScript</strong>. If a feature in %ZLANG has the same name as astandard <strong>Caché</strong> feature, the standard feature is always the one that is invoked.The %ZLANG library name must be specified on the first line, beginning with column 1.Although this library tag should never be called as an entrypoint, it is good programmingpractice to follow it by a QUIT command (indented, in line 2) to prevent “fall through.” A%ZLANG library can contain one or more entrypoints, each specified by a tagname. However,all entrypoints in a %ZLANG library must be for the same type of routine (letter code) andlanguage mode (numeric code), as specified in the library name.The tag name for all %ZLANG features must follow the naming conventions of specifyingthe letter “Z” as the first letter of the feature name, and using only uppercase letters. (Featuresmay be invoked using any combination of uppercase or lowercase letters.) It is also stronglyrecommended that %ZLANG feature names avoid names of standard <strong>Caché</strong> features, and<strong>Caché</strong> and SQL reserved words. Further details on tag name conventions are specified below.You can also specify user-defined extrinsic functions using the $$ prefix syntax, as describedin User Defined Code chapter of Using <strong>Caché</strong> <strong>ObjectScript</strong>.Note:%ZLANG features generally do not execute as rapidly as standard <strong>Caché</strong> features.This performance limitation should be taken into consideration when coding performance-criticalroutines.Tag Name ConventionsA tag name is the label name used to invoke a %ZLANG feature from <strong>Caché</strong> <strong>ObjectScript</strong>code. The rules governing a tag name are different, and more restrictive, than the rules governinginvocation of that feature from code.• Because a tag name is a label, it must begin at column 1. The executable <strong>Caché</strong><strong>ObjectScript</strong> code for the feature must be indented.• A tag name for a function or a special variable does not begin with a dollar sign ($). Thisdollar sign is only used when invoking the function or special variable.• A tag name must begin with the letter “Z”. It can consist only of letters and numbers. Itcan include Unicode letter characters.• A tag name must consist of all uppercase characters. You can invoke the feature from<strong>Caché</strong> <strong>ObjectScript</strong> using any combination of uppercase or lowercase letters.• A tag name must be unique within %ZLANG, cannot duplicate the name of an existing<strong>Caché</strong> <strong>ObjectScript</strong> feature, and cannot be a reserved word.736 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!