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.

System and Other Functions• $ZLCHAR function• $ZWASCII function$ZWIDTHReturns the total width of the characters in an expression.$ZWIDTH(expression,pitch)ParametersexpressionpitchA string expressionOptional — The numeric pitch value to use for full-width characters.The default is 2. Other permissible values are 1, 1.25, and 1.5.Description$ZWIDTH is a DSM-J function available in <strong>Caché</strong> <strong>ObjectScript</strong>. $ZWIDTH returns thetotal width of the characters in expression. The pitch value determines the width to use forfull-width characters. All other characters are assigned a width of 1 and are considered to behalf-width.Note:$ZWIDTH can be abbreviated as $ZW in DSM-J mode. This abbreviation cannotbe used in <strong>Caché</strong> mode.ExampleAssume that the variable STR contains two half-width characters followed by a full-widthcharacter:WRITE $ZWIDTH(STR,1.5)returns 3.5.In this example, the two half-width characters total 2. Adding 1.5 (the specified pitch value)for the full-width characters produces a total of 3.5.NoteFull-width characters are determined by examining the pattern-match table loaded for your<strong>Caché</strong> process. Any character with the full-width attribute is considered to be a full-width730 <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!