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.

<strong>Caché</strong> <strong>ObjectScript</strong> CommandsfA format control to position the output on the target device. You can specify any combinationof format control characters without intervening commas, but you must use a comma to separatea format control from an expression. For example, when you issue the following WRITEto a terminal:WRITE #!!!?6,"Hello",!,"world!"The format controls position to the top of a new screen (#), then issue three line returns (!!!),then indent six columns (?6). The WRITE then displays the string Hello, issues a line return,then displays the string world!. Note that the line return repositions to column 1; thus in thisexample, Hello is displayed indented, but world! is not.Format control characters cannot be used with an argumentless WRITE.For further details, see Using Format Controls with WRITE .expressionThe value you wish to output. Most commonly this is either a quoted string or a numeric.However, expression can be any valid <strong>Caché</strong> <strong>ObjectScript</strong> expression, including literals,variables, object methods, and object properties. For more information on expressions, seeUsing <strong>Caché</strong> <strong>ObjectScript</strong>.*integer-expressionAny valid <strong>Caché</strong> <strong>ObjectScript</strong> expression that evaluates to an integer that corresponds to acharacter. An integer-expression in the range of 0 through 255 evaluates to the corresponding8-bit ASCII character. An integer-expression in the range of 256 through 65534 evaluates tothe corresponding 16-bit Unicode character. Integer expressions can be used to displayaccented characters. For example to display the word “<strong>Caché</strong>” you can use:WRITE "Cach",*233To write the name of the composer Anton Dvorak with the proper Czech accent marks, use:WRITE "Anton Dvo",*345,*225,"k"Integer expressions can also be used to insert control characters (such as the line feed: *12)which govern the appearance of the display, or special characters such as *7, which rings thebell on a terminal.162 <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!