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

Moon's remarks on ~F,~E,~G,~$



First, namy thanks to Dave for typing all that stuff in from
the FORTRAN-77 standard.

Second, I agree with substantially all of his remarks and proposed
modifications and clarifications.

Regarding fields full of asterisks, there is an interesting suggestion
in the appendixes to the IEEE proposed standard:  if a number is too big
to fit in an output field, then the line gets broken.  The best way
to see this is by example:
(FORMAT T "~%xxxxx~6,3Fzzzzz" 12345.6789)
xxxxx
 12345.6789yyyy
The idea is that if N columns are specified and you need N+K columns
to print the number, and the cursor is at absolute column P, then
you do one of two things:
(a) If you want to keep the right-hand end aligned, output a return
and then tab to column P-K; then output the N+K characters.
(b) If you want to keep the left-hand end aligned, or if P-K is negative,
you output the N+K characters, then a return, then tab to column P+N.
The advantage of this is that it is easy to see what happened,
and columns of numbers stay aligned.  Indeed, we might want to consider
this strategy for all fixed-width cases in FORMAT.
--Guy