## $Y## M[UMPS] by Example |

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)
is transmitted).

The effect of the command `Write /CUP(4,3)`,
however, will be that $X=2 and $Y=3.

Approved for addition in a future M[UMPS] Language Standard.

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).

Copyright © Standard Documents; 1977-2017 MUMPS Development Committee;

Copyright © Examples: 1995-2017 Ed de Moel;

Copyright © Annotations: 2003-2017 Jacquard Systems Research.

*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, 07:17:40 .

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