Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples
Left Hand Pointer


M[UMPS] by Example

Right Hand Pointer

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

This command relinquishes ownership of the current device.

Clarification (no change intended) in a future M[UMPS] language standard:

Any keywords in the argument of the command are processed in strict left-to-right order. When multiple equivalent parameters are encountered, the last occurrence processed will define the action(s) to be taken.

To be modified in a future M[UMPS] language standard.

The modification is the specification that, if the current device is Closed, the value of $IO will become the empty string.

For  Do  Quit:DEVICE=""
. Use $Principal
. Write !,"Test device: " Read DEVICE
. Quit:DEVICE=""
. Write !
. Open DEVICE:1
. If '$Test Write !,"Cannot OPEN..." Quit
. Open $Principal Use $Principal
. If CHECK'="" Write !,"New standard not observed."
. Quit

Additions in a future M[UMPS] language standard.

The ability to specify "user-defined" mnemonicspaces is added. It will be possible to specify to an implementation to use entries in a specific routine (let's call it USER for the purpose of this discussion) for the processing of the commands Open, Use and Close and the various controlmnemonics for specific combinations of device and mnemonicspace.

When this feature is active, the controlmnemonic /ABC(P1,P2) will be executed as Do ABC^USER(P1,P2), and the command Close device:(PARAM1:KEY2=VALUE2) will be executed as:

. New X,Y
. Set (X,Y)=2 ; Number of deviceparameters
. Set X(1)="PARAM1" ; First deviceparameter
. Set X(2)="KEY2",Y(2)=VALUE2
. Do %CLOSE^USER(device,.X,.Y,"")
. Quit

The name of a device may contain an environment specification
Close |"LONDON"|MTA47

When the device being Closed happens to be the the current device when the Close command is issued, the value of special variable $IO will change to be the empty string.

For more examples, see the examples with the Use command.

The addition of a binding to TCP/IP socket devices includes a new deviceparameter.

The deviceparameter is SOCKET. For examples, see the Use command.

For a program that parses a programming language, it is hard to see the difference between:
In the former example, the text between the parentheses should be an expression that happens to return a boolean value, whereas in the latter example, the text between the parentheses could be a "keyword equals value" combination that has a meaning in certain mnemonicspaces.

In order to make it easier to indicate this difference, the option to precede a devicekeyword with a slash has been introduced. This would make the latter example look like:

If an output time-out was established for a device, Closeing that device will cancel the time-out.

Examples with naked references:

Set ^ABC(1,2)="reset naked indicator"
; naked indicator is now ^ABC(1,
Close ^(3,4)
; naked indicator is now: ^ABC(1,3,
; Actual reference: ^ABC(1,3,4)

Set ^ABC(1,2)="reset naked indicator"
; naked indicator is now ^ABC(1,
Close ^(3,4):^(5,6)
; 1. fetch ^(3,4) = ^ABC(1,3,4)
; 2. fetch ^(5,6) = ^ABC(1,3,5,6)
; naked indicator is now: ^ABC(1,3,5,

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-2018 MUMPS Development Committee;
Copyright © Examples: 1995-2018 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2018 Ed de Moel.

The information in this page is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.

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 13-Sep-2014, 17:43:58 .

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