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

routine

Annotations

label

Introduced in the 1977 ANSI M[UMPS] language standard.

This metalanguage symbol represents a label in a M[UMPS] routine.
A label can be either a name or a string of digits.

Note: Leading zeroes in a label are significant.
Note: If a label starts with a digit, it must be all digits.

line

Introduced in the 1977 ANSI M[UMPS] language standard.

This metalanguage symbol represents a line of M[UMPS] code.

A line of code looks like: optionally a label, then a “line start white space”, optionally followed by zero or more commands, optionally followed by a comment. Between the various commands, there is “command separating white space”, if there is a comment, there is “command separating white space” between the last command on the line and that comment.

The “line start white space” is exactly one space character.

The “command separating white space” is exactly one space character.

Examples:

(The symbol ␣ is used in these examples to make the space character(s) visible):


␣;␣comment
LABEL␣;␣comment
Set␣X=1
Set␣X=1␣Write␣␣X
Set␣X=1␣WriteX␣;␣comment
Else␣␣Set␣X=3

(Note: In the last example, there are two spaces following the verb ELSE. The first space separates the word ELSE from its (non-existent) argument, the second space separates that argument from the next command.)

Additions in the 1990 ANSI M[UMPS] language standard.

There may be a parameter list following the label.

Following the “line start white space” there may be one or more “line indent markers”. A “line indent marker” consists of a period, optionally followed by one or more space characters.

The “line start white space” is one or more space characters.

The “command separating white space” is one or more space characters.

Examples:

(The symbol ␣ is used in these examples to make the space character(s) visible):

␣␣␣␣; comment
LABEL(A,B)␣; comment
␣␣␣␣Set␣X=1
Set␣X=1␣␣␣Write␣X
␣.␣.␣␣␣Set␣X=1␣Write␣ X␣␣␣␣; comment
Else␣␣Set␣X=3

but not:

Set␣␣␣␣X=2

Approved for addition in a future M[UMPS] language standard:

Spaces may occur at the end of a line.
␣␣␣Set␣X=1␣␣␣Write␣"Hello."␣␣␣

ls

Introduced in the 1977 ANSI M[UMPS] language standard.

This metalanguage symbol represents the line start character (which is equal to a space). Note that many “pretty print” programs represent the line start “white space” as a tabulation, but internally, a line start is represented as a space.

Addition in the 1984 ANSI M[UMPS] language standard.

A line start may now consist of one or more spaces.

routine

Introduced in the 1977 ANSI M[UMPS] language standard.

This metalanguage symbol represents the unit of program interchange. It begins with a header (see metalanguage symbol routinehead), which is not executable, followed by the executable code (see metalanguage symbol routinebody, followed by an “end of routine” marker (see metalanguage symbol eor).

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.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 17-Nov-2023, 10:11:24.

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