Introduced in the 1977 ANSI M[UMPS] language standard.
WRITE # ; Start at a new page
WRITE "This appears at the top of the page."
WRITE "Now we are 5 lines further down."
WRITE ?10,"And this line is indented (10 positions)."
The most common usages of the WRITE command.
Expressions are allowed in arguments of the WRITE command.
Note: The exclamation mark may appear anywhere in a sequence of arguments of the WRITE command. Choose one standard for your application (always at the beginning, or always the end) and stick to that. Which one you choose is not important; being consistent is.
Although most implementations will interprete this command as WRITE $CHAR(65), the effect of this command is implementation-specific and device specific. In general, this syntax is not considered to be portable.
Addition in the 1995 ANSI M[UMPS] language standard.
USE DEVICE::"X3.64" WRITE /CUP(5,10)
Position the cursor at location (5,10) and update $X and $Y accordingly ($X=5, $Y=10).
USE DEVICE::"X3.64" WRITE /SGR(0),"Reset"
USE DEVICE::"X3.64" WRITE /SGR(1),"Bold"
USE DEVICE::"X3.64" WRITE /SGR(2),"Faint"
USE DEVICE::"X3.64" WRITE /SGR(3),"Italic"
USE DEVICE::"X3.64" WRITE /SGR(4),"Underscore"
USE DEVICE::"X3.64" WRITE /SGR(5),"Slow blink"
USE DEVICE::"X3.64" WRITE /SGR(6),"Rapid blink"
USE DEVICE::"X3.64" WRITE /SGR(7),"Reverse video"
Turn on the various graphic renditions. Of course, not all devices can realize all attributes (it would be a neat trick to implement blinking on a laserprinter...), but these are the rendition codes that are defined in ANSI X3.64.
Sample function to erase a display:
OPEN TTY USE TTY::"X3.64"
USE $PRINCIPAL WRITE !,"Cursor to left upper corner."
USE TTY WRITE /CUP(1,1)
USE $PRINCIPAL WRITE !,"Erase screen."
USE TTY WRITE /ED
Create a display with questions in bold-face and answers in
WRITE /CUP(1,1) WRITE /ED
FOR I=1:1:QUESTIONS DO
. WRITE /CUP(YQ(I),XQ(I))
. WRITE /SGR(1),QUESTION(I)
. WRITE /CUP(YA(I),XA(I))
. WRITE /SGR(7),ANSWER(I)
The most common functions in ANSI X3.64 are itemized in X3.64 description.Approved for addition in a future ANSI M[UMPS] language standard.
The ability to specify an "output time-out" is added. An output time-out is specified as a device parameter in an OPEN or USE command. Examples are shown with the USE command.
The addition of a binding to TCP/IP socket devices includes a number of new controlmnemonics.
USE DEVICE::"SOCKET" WRITE /LISTEN
Switch to the mnemonicspace that handles TCP/IP connections (sockets), and establish the implementation-default queue depth for listening to incoming requests.
Switch to the mnemonicspace that handles TCP/IP connections (sockets), and use the specified value for the queue depth for listening to incoming requests.
Wait for an event to occur on any socket associated with the current device. When an event occurs, the value of special variable $KEY will indicate the nature of the event.
Wait for an event to occur on any socket associated with the current device, or until the time-out specified in the parameter elapses (whichever occurs first). When an event occurs, the value of special variable $KEY will indicate the nature of the event.
Whether or not a duration is specified, the value of $KEY will contain the substring "CONNECT" when a connection request is received by a "listening" server, and the value of $KEY will contain the substring "READ" when a message is received through a connectionless protocol.
More examples are shown with the USE command.Approved for addition in a future ANSI M[UMPS] Language standard.
User-definable I/O handling has been added. When
user-definable I/O handling is active:
Examples with naked references:
SET ^ABC(1,2)="reset naked indicator"
; Naked indicator is now ^ABC(1,
; Naked indicator is now: ^ABC(1,3,
; Actual reference is: ^ABC(1,3,4)
Addition in the 1994 ANSI M[UMPS] GKS Binding.
; This routine draws a yellow star on a blue
; background and writes the title 'STAR' in
; green under the star.
; GKS level: ma
; The implementation must support at least one
; workstation of category output or outin.
OPEN DEVICE,DISPLAY ; Implementation dependent
SET WK1="Workstation one"
; OPEN virtual GKS display
; Center the window and the origin
; Define the colours to be used
; Draw the star
; Title of graph
; Close the graph and the virtual display
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
The MDC cannot guarantee that these 'next' standards will indeed appear.