☜ | QUIT1995 Version of ANSI (Equivalent to Current ISO Version) of Standard | ☞ |
Q[UIT] postcond | │ │ │ │ |
[ SP ] SP expr SP @ expratom V expr |
│ │ │ │ |
Quit terminates execution of an argumentless Do command, doargument, xargument, exfunc, exvar, or For command.
Encountering the end-of-routine mark eor is equivalent to an unconditional argumentless Quit.
The effect of executing Quit in the scope of For is fully discussed in 8.2.5. Note the eor never occurs in the scope of For.
If an executed Quit is not in the scope of For, then it is in the scope of some argumentless Do command, doargument, xargument, exfunc, or exvar if not explicitly then implicitly, because the initial activation of a process, including that due to execution of a jobargument, may be thought of as arising from execution of a Do naming the first executed routine of that process.
The effect of executing a Quit in the scope of an argumentless Do command, doargument, xargument, exfunc, or exvar is to restore the previous variable environment (if necessary), restore the value of $Test (if necessary), restore the previous execution level, and continue execution at the location of the invoking argumentless Do command, doargument, xargument, exfunc, or exvar.
If the expr is present in the Quit and the return is not to an exfunc or exvar, an error condition occurs with ecode="M16". If the expr is not present and the return is to an exfunc or exvar, an error condition occurs with ecode="M17".
The following discussion uses terms defined in the Variable Handling (see 7.1.2.2) and Process-Stack (see 7.1.2.3) models and, like those subclauses, does not imply a required implementation technique.
Execution of a Quit occurs as follows:
Finally, copy all NAME-TABLE entries from this frame into the NAME-TABLE.
Processing of this frame is complete, continue at step b.
Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.
This page most recently updated on 15-Nov-2023, 14:46:53.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)