Introduced in the 1977 ANSI M[UMPS] language standard.
This command relinquishes ownership of the current device.
Clarification (no change intended) in a future ANSI 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 ANSI 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
. USE DEVICE CLOSE DEVICE
. SET CHECK=$IO
. OPEN $PRINCIPAL USE $PRINCIPAL
. IF CHECK'="" WRITE !,"New standard not
observed."
. QUIT
Additions in a future ANSI 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:
DO . 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,"") . QUITThe name of a device may contain an environment specification
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:
...:(abc=xyz):...
and
...:(FILENAME="C:\temp\ABC.TMP"):...
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:
...:(/FILENAME="C:\temp\ABC.TMP"):...
If an output time-out was established for a device, CLOSEing that device will cancel the time-out.
Examples with naked references:
CLOSE DEVICE
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)
CLOSE DEVICE:PARAMETERS
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,
This document is © Ed de Moel, 1995-2005.
It is part of a book by Ed de Moel that is published under
the title "M[UMPS] by Example" (ISBN 0-918118-42-5).
Printed copies of the book are no longer available.
This document describes the various commands that are defined in the M[UMPS] language standard (ANSI X11.1, ISO 11756).
The information in this document is NOT authoritative
and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an
authoritative definition.
In this document, information is included that will
appear in
future standards.
The MDC cannot guarantee that these 'next'
standards will indeed appear.