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.

$QUIT$QUITContains a flag indicating what kind of QUIT is required to exit the current context.$QUIT$QDescription$QUIT contains a value that indicates whether an argumented QUIT command is requiredto exit from the current context. If an argumented QUIT is required to exit from the currentcontext, $QUIT contains a one (1). If an argumented QUIT is not required to exit from thecurrent context, $QUIT contains a zero (0).In a context created by issuing a DO or XECUTE command, an argumented QUIT is notrequired to exit. In a context created by a user-defined function, an argumented QUIT isrequired to exit.This special variable cannot be modified using the SET command. Attempting to do so resultsin a error.ExampleThe following example demonstrates $QUIT values in a DO context, in an XECUTE context,and in a user-defined function context.The sample code is as follows:QUIDO. WRITE !,"$QUIT in a DO context = ",$QUIT. QUITXECUTE "WRITE !,""$QUIT in an XECUTE context = "",$QUIT"SET A=$$AQUITA()WRITE !,"$QUIT in a User-defined function context =",$QUITQUIT 1A sample session using this code might run as follows:USER>DO ^QUI$QUIT in a DO context = 0$QUIT in an XECUTE context = 0$QUIT in a User-defined function context = 1<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 443

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

Saved successfully!

Ooh no, something went wrong!