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

[no subject]



CC: GLS at MIT-AI

I finally got fed up with FORMAT and made some changes to the code.
It's not thoroughly tested yet; in case of lossage, LMIO;FORMAT OQFASL
should be restored to QFASL status.
Among the changes:
~:P is like ~P but uses the previous argument, not the next.
   Hence "~D loser~P" does the right thing and swallows one argument.
~@P outputs "y" or "ies" as appropriate.
~@[str~] will process str iff the next argument is non-nil.  The argument
   is NOT SWALLOWED.  Thus "~@[PRINLEVEL=~D~]" prints its argument in decimal
   unless it is nil.  (I want to do this all the time.)
~B is like ~O and ~D, but binary.

INCOMPATIBLE CHANGE:
~{ no longer outputs ", " automatically between items.  Instead, there is
a new command ~$ which terminates the current format string if there are
no more arguments to be processed.  Actually, there are ~$, ~:$, ~{, ~:{,
~@{, ~:@{.  One can get the old effect of "~{foo~}" by doing "~{foo~$, ~}".
I'll document all this better later.

I also put a documentation string into the definition of FORMAT,
and fixed spelling errors in the English (~R) output stuff.