☜ | routine1984 Version of ANSI Standard | ☞ |
The routine is the unit of program interchange. In program interchange, each routine begins with its routinehead, which contains the identifying routinename, and the routinehead is followed by the routinebody, which contains the executed code. The routinehead is not part of the executed code.
routine | ::= | routinehead | routinebody |
See also the transition diagram for routine.
routinehead | ::= | routinename | eol |
routinename | ::= | name |
The routinebody is a sequence of lines terminated by the eor. Each line ends with eol, starts with ls optionally preceded by a label, and may contain zero or more commands (separated by one or more spaces) between ls and eol. Any line may end with a comment immediately preceding the eol. Zero or more spaces may separate the comment from the last command of the line.
routinebody | ::= | line | [ line ] ... | eor |
line | ::= | [ label ] | ls | ┌ │ └ |
commands [ [ cs ] comment ] [ cs ] comment |
┐ │ ┘ |
eol |
See also the transition diagram for line.
label | ::= | │ │ │ |
name intlit |
│ │ │ |
See also the transition diagram for label.
ls | ::= | SP | [ SP ] ... | (one or more spaces) |
cs | ::= | SP | [ SP ] ... | (one or more spaces) |
eol | ::= | CR LF | (two control characters) |
eor | ::= | CR FF | (two control characters) |
Each occurrence of a label to the left of ls in a line is called a “defining occurrence” of label. No two defining occurrences of label may have the same spelling in one routinebody.
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:11:24.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)