[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grt optys in data proc

"Too ugly for words": De gustibus non disputandum est.  There is a problem
with what to do if a quantity will not fit in the FORMAT field allotted
to it.  Some constraint has to give:
(a) The FORTRAN solution is to sacrifice the requirement of printing the
datum; instead, a field of asterisks is printed.
(b) The current MacLISP/LISP Machine solution is to sacrifice horizontal
alignment; the datum is allotted extra columns, and everything to the
right gets pushed over.
(c) The suggestion from the IEEE standard is to sacrifice vertical
alignment, by pushing everything below the line down, in order to create
room for the too-large datum without misaligning everything else to the
It seems to be simply a matter of which two of the three constraints
seem more important than the third.  I don't much care; I just wanted
to offer this unusual alternative.  I find that it doesn't look too
bad in practice.

"A beast to implement": I didn't think it was that bad.  Given that
you're trying to right-justify some data in a fixed-width field anyway,
you must have calculated the needed width ahead of time anyway in
order to pad on the left.  It is just a couple of conditional tests,
that I supplied in my note, to determine what action to take.  The success
of the action depends only upon being able to detect the current column
position; i.e., it can win iff a ~T command could win.  If a ~T command
could not win, then you just punt this strategy and revert to strategy (b)

I don't much care, but would like to know whether other people find
this idea interesting.  Too bad Moon used up the : and @ flags for
something else.  (Say!  I was going to suggest a third flag character "!"
because ~C needs more than four variants.  For ~F, ~E, ~G it could
specify whether you want to preserve vertical and horizontal alignment.
And just think of what an extra flag character could do for ~[ !
~:![ could be an unwind-protect:  ~:![aaa~;bbb~] outputs bb even if
a ~^ happens within aaa.  And