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> Special VariablesExampleThe following code performs a timed read and uses $TEST to test for completion of the read.READ a:10GOTO:$TEST x ; received dataELSE GOTO y ; did not receive dataNotesOperations That Do Not Set $TESTJOB, LOCK, OPEN, READ, and CLOSE commands without a time-out have no effect on$TEST. Postconditional expressions also have no effect on $TEST.The block-oriented IF command (which defines a block of code by enclosing it in curlybraces) does not use $TEST in any way. Some invocations of the legacy IF command alsodo not use $TEST: IF commands without an argument, and the ELSE command have noeffect on $TEST.Unsuccessful Timed Operations<strong>Caché</strong> does not produce an error message after an unsuccessful timed operation. Your applicationmust check $TEST and then produce an appropriate message.See Also• CLOSE command• JOB command• LOCK command• OPEN command• READ command• IF command• IF (legacy version) command452 <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!