12.07.2015 Views

Using Caché Globals - InterSystems Documentation

Using Caché Globals - InterSystems Documentation

Using Caché Globals - 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.

Global Structurethan 1023 typed characters). Therefore, if using multiple subscript levels, it is helpful to avoid longsubscript names and global names.CAUTION:The preceding rules apply for all <strong>Caché</strong> supported collations. For older collations stillin use for compatibility reasons, such as “pre-ISM-6.1” , the rules for subscripts aremore restrictive. For example, character subscripts cannot have a control character astheir initial character; and there are limitations on the number of digits that can beused in integer subscripts.Because of restrictions such as these, there is no guarantee that subscripts used forsupported collations will be valid in pre-<strong>Caché</strong> collations.2.1.2.1 Determining the Maximum Length of a SubscriptSeveral factors determine the total number of characters that can appear in a reference to a local orglobal variable. These include:• The length of the global name• The number of subscripts used• Whether each subscript is a number or a string• For string subscripts, the character set encoding usedTo calculate the size of the reference, use the following guidelines:1. In the global name: for each character, add 1.2. In a numeric subscript: for each digit, sign, or decimal point, add 1.3. In a string subscript: for each character, add 3. (For more information on this, see “A Note onASCII and Multibyte Characters in Subscript Names.” )4. For each subscript, add 1.If the sum of these is greater than 511, the subscript may be too long to use as a reference for a localor global variable.Important:The following factors also determine the maximum length of the subscript:• For numeric subscripts, in both Studio and <strong>Caché</strong> Terminal, and with both localand global variables, a subscript is limited to 309 digits; larger values result in a error.• For string subscripts in <strong>Caché</strong> Terminal, with local variables, a subscript nameis limited to 251 characters; larger values result in a error. Aglobal variable subscript name does not have this limit.8 <strong>Using</strong> <strong>Caché</strong> <strong>Globals</strong>

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

Saved successfully!

Ooh no, something went wrong!