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.

$TEST• The <strong>Caché</strong> Class Library in Using <strong>Caché</strong> Objects• Using Objects with <strong>Caché</strong> <strong>ObjectScript</strong> in Using <strong>Caché</strong> Objects$TESTContains the truth value resulting from the last command using the time-out option.$TEST$TDescription$TEST contains the truth value (1 or 0) resulting from the last command with a time-out. Itcan be set by any command or function that can return a logical condition. Commands thatcan take a time-out value include JOB, LOCK, OPEN, READ, and CLOSE.$TEST is set by the following commands, regardless of whether they are entered from programmermode or encountered in routine code:• A timed READ sets $TEST to 1 if the read completes before the time-out expires. If thetime-out expires, $TEST is set to 0.• A timed LOCK sets $TEST to 1 if the lock attempt succeeds before the time-out expires.If the time-out expires, $TEST is set to 0.• A timed OPEN sets $TEST to 1 if the open attempt succeeds before the time-out expires.If the time-out expires, $TEST is set to 0.• A timed JOB sets $TEST equal to 1 if the attempt to start the new job succeeds beforethe time-out expires. If the time-out expires, $TEST is set equal to 0.Note:$TEST is also set by the obsolete legacy version of the IF command. It is neitherset nor checked by the current block-structured IF command. When the test expressionof a legacy IF command is evaluated, $TEST is set equal to the resulting truth value.In other words, if the IF expression tests true, $TEST is set to 1. If it tests false,$TEST is set to 0 (zero).This special variable cannot be modified using the SET command. Attempting to do so resultsin a error.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 451

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

Saved successfully!

Ooh no, something went wrong!