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.

A single-character read accepts a single input character and stores its ASCII decimalequivalent in the specified variable. It stores the character itself in the $ZB and $KEYspecial variables. Input concludes automatically when a single character is input. A terminatorcharacter is considered a single-character input, and is stored as such. A timeoutsets variable to –1.ArgumentspcAn optional postconditional expression. <strong>Caché</strong> executes the command if the postconditionalexpression is true (evaluates to a non-zero numeric value). <strong>Caché</strong> does not execute the commandif the postconditional expression is false (evaluates to zero). For further details, referto Command Postconditional Expressions in Using <strong>Caché</strong> <strong>ObjectScript</strong>.variableThe local variable, process-private global, or global that is to receive the input data. It canbe either unsubscripted or subscripted. If a specified variable does not already exist, <strong>Caché</strong>defines it at the beginning of the READ operation. If a specified variable is defined and hasa value, <strong>Caché</strong> clears this value at the beginning of the READ operation. When you inputcharacters, they are stored in variable as they are input; therefore if a read operation is interruptedby a timeout, the characters typed up to that point are stored in variable. (However,note the behavior of variable upon a encountered a interrupt, as described below.)Non-printing characters (such as ) are stored in variable. A terminator character canbe used to conclude any type of read operation. For example, from a terminal, you press the key to conclude a read operation. This terminator character is not stored in variablefor a variable-length or fixed-length read. The terminator character is stored in variable fora single-character read.nREADA positive integer specifying the maximum number of characters to accept for a fixed-lengthread. The READ completes either when the specified number of characters is input, or whenit encounters a terminator character. This argument is optional, but if specified the preceding# symbol is required.Specifying zero or a negative number results in a error. However, leading zerosand the fractional portion of a number are ignored, and the integer portion used. You canspecify n as a variable or an expression that resolve to an integer.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 117

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

Saved successfully!

Ooh no, something went wrong!