Introduced in the 1977 ANSI M[UMPS] language standard.
Note: the value $Y is an approximation of the current location of the vertical position of the cursor on the current I/O device. There are many examples where the value of $Y deviates significantly from the actual vertical position of the cursor. This is a problem that is somewhat relieved by an addition in the 1995 standard.
> IF $Y>MAXLIN WRITE #!,HEADER
The value of $Y is defined to be an approximation of the vertical cursor coordinate, and the standard provides no guarantees about the accuracy of this approximation.
Addition in the 1995 ANSI M[UMPS] language standard.
This standard allows the value of $Y to be re-defined in a SET command, so that, in case the value of $Y lost synchronization with the actual value of the cursor, the programmer can correct the value of $Y.
If the cursor is positioned using any of the functions from the ANSI X3.64 standard, the standard defines that the value of $Y will be updated accurately.
Assuming that $X=20 and $Y=10, the effect of the
command WRITE $CHAR(27),"[3;4H" will most likely
be that $X is incremented by 6 (the number of characters
transmitted) or by 5 (some implementations do not increment
$X when a control character like $CHAR(27) (escape)
The effect of the command WRITE /CUP(4,3), however, will be that $X=2 and $Y=3.
The initial value of $Y is implementation-dependent. However, if the initial value of $IO is the empty string, then the initial value of $Y is 0 (zero).
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 special variables 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.