11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Caché</strong> <strong>ObjectScript</strong> CommandsType of READVariable data$TESTvalue$ZAvalue$ZB valueVariable, ended withline returninput characters (ornull string if none)10terminatorcharacterVariable, some input,then timeoutinput characters02null stringVariable, no input,timeoutnull string02null stringFixed, all charsenteredinput characters10the lastcharacterenteredFixed, line returninput characters (ornull string if none)10terminatorcharacterFixed, timed outinput characters (ornull string if none)02null stringSingle character, datainputASCII value of inputcharacter10the inputcharacterSingle character,terminator characterinputASCII value ofterminator character10,256terminatorcharacterSingle character,timed out–102null string$ZB and $KEYThe $ZB and $KEY special variables return the exact same value for every type of read,except one. When you perform a fixed-length read and input the specified number of characters,the READ completes without a terminator. In this case, $ZB contains the last characterinput (the terminating character), and $KEY contains the null string (there being no terminatorcharacter).InterruptsIf a read operation is interrupted, variable reverts to its previous state. For example, if youinput several characters for a read operation, and then issue a interrupt, variablereverts to its state prior to the read operation. That is, if it was undefined, it remains undefined;if it had a previous value, it contains the previous value. This behavior is completely different122 <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!