Using Caché ObjectScript - InterSystems Documentation
Using Caché ObjectScript - InterSystems Documentation
Using Caché ObjectScript - InterSystems Documentation
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Data Types and Values<br />
There are no other escape sequences within <strong>ObjectScript</strong> string literals.<br />
3.1.2 Concatenating Strings<br />
You can concatenate two strings into a single string using the _ concatenation operator:<br />
Concatenation<br />
Set string = "Hello" _ " Goodbye"<br />
Write string<br />
3.1.3 Long Strings<br />
By default, the maximum <strong>Caché</strong> string size is 32,767 characters. This default can be overridden by enabling long strings,<br />
which increases the maximum length to 3,641,144 characters. You can use either of the following methods to enable or<br />
disable long strings system-wide:<br />
• In the Management Portal, select [System] > [Configuration] > [Memory and Startup]. On the System Memory and Startup<br />
Settings page, select the Enable Long Strings check box. If a process was already running when you enabled long<br />
strings, long strings will not be enabled for that process.<br />
• In the <strong>Caché</strong> parameter file, specify the value of the EnableLongStrings parameter, as described in the EnableLongStrings<br />
section of the <strong>Caché</strong> Parameter File Reference.<br />
<strong>Caché</strong> also supports the use of long strings on an optional, per-instance basis. To enable long strings for the current instance,<br />
use the EnableLongStrings property of the Config.Miscellaneous class.<br />
Note:<br />
Performance may be affected when long strings are enabled. Enabling long strings increases the amount of<br />
memory allocated to the string stack by approximately 50 times. <strong>Caché</strong> uses the string stack for temporary string<br />
handling during command execution. This larger string stack memory is allocated to each process, whether the<br />
process uses long strings or not. You may need to retune your system to maintain performance.<br />
When a process actually uses a long string, the memory for the string comes from the operating system’s malloc() buffer,<br />
not from the partition memory space for the process. Thus the memory allocated for actual long string values is not subject<br />
to the limit set by the maximum memory per process (bbsiz) parameter and does not affect the $STORAGE value for the<br />
process.<br />
3.2 Numbers<br />
Topics related to numbers include:<br />
• Fundamentals of Numbers<br />
• Canonical Form of Numbers<br />
• Non-Numeric Strings as Numbers<br />
• Concatenating Numbers<br />
• Fractional Numbers<br />
16 <strong>Using</strong> <strong>Caché</strong> <strong>ObjectScript</strong>