Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Routine Execution

1995 Version of ANSI (Equivalent to Current ISO Version) of Standard

6.3 Routine execution

Routines are executed in a sequence of blocks. Each block is dynamically defined and is invoked by the instance of an argumentless Do command, a doargument, an exfunc, or an exvar. Each block consists of a set of lines that all have the same LEVEL; the block begins with the line reference implied by the Do, exfunc, or exvar and ends with an implicit or explicit Quit command. If no label is specified in the doargument, exfunc, or exvar, the first line of the routinebody is used. The execution level is defined as the LEVEL of the line currently being executed. Lines which have a LEVEL greater than the current execution level are ignored, i.e., not executed. An implicit Quit command is executed when a line with a LEVEL less than the current execution level or the eor is encountered, thus terminating this block (see 8.2.16 for a description of the actions of Quit). The initial LEVEL for a process is one. The argumentless Do command increases the execution level by one. (See also the Do command and Goto command).

Within a given block execution proceeds sequentially from line to line in top to bottom order. Within a line, execution begins at the leftmost command and proceeds left to right from command to command. Routine flow commands Do, Else, For, Goto, If, Quit, TREstart, Xecute, exfunc and exvar extrinsic functions and special variables, provide exception to this execution flow. (See also 6.3.2 Error Processing.) In general, each command’s argument is evaluated in a left-to-right order, except as explicitly noted elsewhere in this document.

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

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 17-Nov-2023, 10:33:43.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)