Programming Challenge Numbers to Text?
Jonathan Ellis
jonathan at carnageblender.com
Fri May 5 14:17:41 MDT 2006
On Fri, 05 May 2006 14:04:38 -0600, "Shane Hathaway"
<shane at hathawaymix.org> said:
> plug.org at 2nerds.com wrote:
> > This lisp expression:
> >
> > (format t "~r~%~r~%~r~%~r~%~r~%" 1 15 91283 4918239 2147483647)
>
> What does that really mean, and how would I find out? What would happen
> if I used only four "~r~%" sequences instead of five? What about i18n?
> This looks very obtuse to me, and I would consider it a mark *against*
> lisp. I'd much rather use a function with a name like "spell_int" than
> a series of symbols. Is your syntax actually helpful in some way I'm
> not seeing?
I parse that as, the function name is format and the ~r~% sequences are
like %s in printf-style formatting. So if he only had four it would
barf because 5 numbers are being passed.
--
C++ is history repeated as tragedy. Java is history repeated as farce. --Scott McKay
More information about the PLUG
mailing list