☜ | DO1995 Version of ANSI (Equivalent to Current ISO Version) of Standard | ☞ |
D[O] postcond | │ │ │ |
[ SP ] SP L doargument |
│ │ │ |
doargument | ::= | │ │ │ │ │ |
entryref postcond labelref actuallist postcond externref [ actuallist ] postcond @ expratom V L doargument |
│ │ │ │ │ |
An argumentless Do initiates execution of an inner block of lines. If postcond is present and its tvexpr is false, the execution of the command is complete. If postcond is absent, or the postcond is present and its tvexpr is true, the Do places a Do frame containing the current execution location, the current execution level, and the current value of $Test on the PROCESS-STACK, increases the execution level by one, and continues execution at the next line in the routine. (See 6.3 for an explanation of routine execution.) When encountering an implicit or explicit Quit not within the scope of a subsequently executed doargument, argumentless Do, xargument, exfunc, exvar, or For, execution of this block is terminated (see 8.2.16 for a description of the actions of Quit). Execution resumes at the command (if any) following the argumentless Do.
Do with arguments is a generalized call to the subroutine specified by the entryref, the labelref, or the externref in each doargument. The line specified by the entryref or labelref, must have a LEVEL of one. If the line specified is an externref then an implicit LEVEL of 1 is assumed, unless otherwise specified within the binding. Execution of a doargument to a line whose LEVEL is not one causes an error condition with ecode="M14".
If the actuallist is present in an executed doargument, parameter passing occurs and the formalline designated by labelref must contain a formallist in which the number of names is greater than or equal to the number of actuals in the actuallist. If the call is to an externref and an actuallist is present, then parameter passing occurs, and data is transferred (with any conversion as defined in the binding to the external package).
Each doargument is executed, one at a time in left-to-right order, in the following steps.
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:41:58.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)