[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Coming (System 99) changes to FORMAT in the MIT lisp machine system.
- To: info-lispm-mit at MIT-OZ
- Subject: Coming (System 99) changes to FORMAT in the MIT lisp machine system.
- From: Richard Mlynarik <Mly at MIT-OZ>
- Date: Mon ,13 Feb 84 21:32:00 EDT
[See SYS:DOC;SYS98 MSG (oz:ps:<l.doc>sys98.msg at MIT) to see this
message in a technicolor multitude of fonts.]
The control argument to FORMAT will change in System 99 to be compatible
with Common Lisp. There will no longer be separate functions FORMAT and
CLI:FORMAT, as there are in System 98.
This change will affect the following FORMAT directives:
~X ~width,padchar,commacharX
Prints its argument in hexadecimal. (Analogous to ~O, ~B and ~D)
This command used to be used to insert spaces into the output.
Use ~numberofspaces@T to achieve the same result as the old
~numberofspacesX directive.
~F ~width,decimalplaces,scale,overflowchar,padcharF
Prints a floating-point number in nonexponential notation.
Multiplies by 10^scale before printing if scale is specified.
Prints in width positions, with decimalplaces digits after the
decimal point. Pads on left with padchar if necessary. If the
number doesn't fit in width positions, and overflowchar is
specified, this command just fills the width positions with
that character.
This directive used to just take one optional prefix control arg, which
specified how many mantissa digits to print. This is the same
as 2 + decimalplaces for the new FORMAT.
Use ~,n+2F to achieve the same result as the old ~nF directive.
~E ~width,decimalplaces,exponentplaces,scale,overflowchar,padchar,exptcharE
Prints a floating-point number in exponential notation.
Prints in width positions, with exponentplaces digits of
exponent.
If scale (default is 1) is positive, prints scale digits before
point, decimalplaces - scale + 1 after.
If scale is zero, prints decimalplaces digits after the point,
and a zero before if there's room.
If scale is negative, prints decimalplaces digits after the
point, of which the first -scale are zeros.
If exptchar is specified, it is used to delimit the exponent
(instead of "e" or whatever.)
If overflowchar is specified, then if the number doesn't fit in
the specified width, or if the exponent doesn't fit in
exponentplaces positions, the field is filled with overflowchar
instead.
This directive used to just take one optional prefix control arg, which
specified how many mantissa digits to print. This is the same
as 2+decimalplaces for the new FORMAT.
Use ~,n+2E to achieve the same result as the old ~nE directive.
~G ~width,decimalplaces,exponentplaces,scale,overflowchar,padchar,exptcharG
Like ~E, but if the number fits without an exponent, it is
printed without one.
This command used to be used to go to a particular argument.
Use ~argumentnumber@T to achieve the same result as the old
~argumentnumberG directive.
Note: in System 98 you must use CLI:FORMAT to use the new Common Lisp style format
directives. GLOBAL:FORMAT will continue to use the old directives.
In System 99 these two functions will become identical, so the best thing is to
update your code to use CLI:FORMAT now so that it will work in both System 98
and in future systems.
Since Brand S have also announced their intention to also change the meaning of
FORMAT directives to agree with Common Lisp at some time in the future, this will
also be compatible change in that respect.
All MIT lispms have a new instruction, CLI:FORMAT
(common-lisp-incompatible-format) Please update your code.