Steven Estes - 2001-06-07

Logged In: YES
user_id=97877

Hello Paulo, and thank you for your post. Unfortunately, we
cannot change things like this to work as you suggest
because their definitions and interactions are pretty much
fully described in the ANSI M standard to which we adhere as
much as possible. Here's a brief summary of why the behavior
you see is working as it is supposed to:

The M format control characters are exclamation (!) for
new-line question-mark (?) for position to column (sometimes
called "tabbing") and pound-sign (#) for form-feed. When
n'>$X the standard indicates that ?n is ignored, hence
"backwards tabbing" is not allowed.

The standard defines the maintenance of $X and $Y for the
format control characters, and that all other characters
increment $X by one (1). This means that output of
non-graphic characters by means of $CHAR() or WRITE *, will
generally cause $X and $Y to lose synchronization with the
actual device. This can be overcome by using SET $X (and
$Y), or by enabling the GT.M FILTER device parameter [for
terminal output] with an appropriate argument. Note that
FILTER requires parsing every character of output (which has
performance implications), and assumes a particular [ANSI]
interpretation of control characters and control sequences
[which may not match every device].

For example if you want to write something in column forty
(say B) and something else in column 50 (say A) of the same
line, then the straightforward thing to do is to order the
WRITE:

Write !,?40,B,?50,A

If you can't find a way to order things properly, some other
possibilities are:

Write !,?50,A,$C(13) Set $X=1 Write ?40,B

If this is preceded by a USE $PRINCIPAL:FILTER="CHARACTERS"
the SET command is unnecessary.

Note also that the WIDTH and WRAP device parameters are
factors to consider in screen formatting.

Steve