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

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

Note: the value $X is an approximation of the current location of the horizontal position of the cursor on the current I/O device. There are many examples where the value of $X deviates significantly from the actual horizontal position of the cursor. This is a problem that is somewhat relieved by an addition in the 1995 standard.

`> For I=1:1:50 Write I,"␣␣" If
$X>20 Write !
1␣␣2␣␣3␣␣4␣␣5␣␣6␣␣7␣␣
8␣␣9␣␣10␣␣11␣␣12␣␣13␣␣
14␣␣15␣␣16␣␣17␣␣18␣␣19␣␣
20␣␣21␣␣22␣␣23␣␣24␣␣25␣␣
26␣␣27␣␣28␣␣29␣␣30␣␣31␣␣
32␣␣33␣␣34␣␣35␣␣36␣␣37␣␣
38␣␣39␣␣40␣␣`

The value of $X is defined to be an approximation of the horizontal 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 $X to be re-defined in a Set command, so that, in case the value of $X lost synchronization with the actual value of the cursor, the programmer can correct the value of $X.

If the cursor is positioned using any of the functions from the ANSI X3.64 standard, the standard defines that the value of $X will be updated accurately.

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

The initial value of $X is implementation-dependent. However, if the initial value of $IO is the empty string, then the initial value of $X is 0 (zero).

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

Copyright © Examples: 1995-2018 Ed de Moel;

Copyright © Annotations: 2003-2018 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, 09:25:20 .

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