M[UMPS] Commands

H[ANG]

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

Note: The amount of seconds to be specified may be a fractional number. Many operating environments (especially those running on UnixTM platforms) do not support fractional seconds. This is a limitation of the operating environment, not a limitation of M[UMPS]. For portability, therefore, one cannot rely on the ability to use fractional numbers in this context.

WRITE DATA
HANG 15
WRITE $CHAR(5)
READ RESPONSE#1::1
IF RESPONSE=$CHAR(6) QUIT "OK"
IF RESPONSE=$CHAR(21) QUIT "NAK received"
QUIT "Device timed out"

Check that a device responds according to protocol within defined timing constraints.

Note: In general it is not a good idea to use
IF ERROR WRITE ERRORMSG HANG 20
WRITE # ; Clears screen
QUIT

This example will give the user 20 seconds to read the error message, but it is better to use
IF ERROR DO
. WRITE ERRORMSG
. WRITE !,"Press <return> to continue: "
. READ DUMMY:20
. QUIT
WRITE # ; Clears screen
QUIT

In this case, the user can clear the screen when he/she has read the message, and does not have to wait until the full 20 seconds have passed. Of course, if the error message is important enough, one may wish to leave out the time-out altogether.

Examples with naked references:

HANG DELTATIME
SET ^ABC(1,2)="reset naked indicator"
; Naked indicator is now ^ABC(1,
HANG ^(3,4)

; Naked indicator is now: ^ABC(1,3,
; Actual reference is: ^ABC(1,3,4)


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.