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> CommandsQUITTerminates execution.QUIT:pc expressionQ:pc expressionArgumentspcexpressionOptional — A postconditional expression.Optional — A <strong>Caché</strong> <strong>ObjectScript</strong> expression.DescriptionThe QUIT command has two forms:• Without an argument• With an argumentA postconditional is not considered an argument. The $QUIT special variable indicateswhether or not an argumented QUIT command is required to exit from the current context.Two error codes are provided for this purpose: M16 “Quit with an argument not allowed”and M17 “Quit with an argument required.” For further details, see $ECODE and the ANSI-Standard M Error Messages listing in the <strong>Caché</strong> Error <strong>Reference</strong>.QUIT Without an ArgumentQUIT without an argument terminates the execution level of a process started with a DO,XECUTE, or FOR command.If the DO, XECUTE, or (unnested) FOR command was given in programmer mode, QUITreturns control to programmer mode. If the terminated process contains any NEW commandsbefore QUIT, QUIT automatically KILLs the affected variables and restores them to theiroriginal values.QUIT With an ArgumentQUIT expression terminates a user-defined function or an object method and returns thevalue resulting from the specified expression.If an argumented QUIT is invoked inside a subroutine called by a DO command and is inthe scope of that DO argument, then the QUIT command evaluates its argument (and anyside effects of that evaluation occur) but otherwise ignores the QUIT argument and returns110 <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!