This is neat...

Miscellaneous Forums/General Discussion/This is neat...

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Lisp rocks. It has a format form that behaves kind of like printf in C. One of the directives to format automatically prints a number as a word.

For instance

(format nil "~r" 3523)

prints "three thousand five hundred twenty-three"

Just messing around I found that it can print this...

(format nil "~r" 160693804425899027554196209234434342342423424354353525335235235233)

"one hundred sixty vigintillion six hundred ninety-three novemdecillion eight hundred four octodecillion four hundred twenty-five septendecillion eight hundred ninety-nine sexdecillion twenty-seven quindecillion five hundred fifty-four quattuordecillion one hundred ninety-six tredecillion two hundred nine duodecillion two hundred thirty-four undecillion four hundred thirty-four decillion three hundred forty-two nonillion three hundred forty-two octillion four hundred twenty-three septillion four hundred twenty-four sextillion three hundred fifty-four quintillion three hundred fifty-three quadrillion five hundred twenty-five trillion three hundred thirty-five billion two hundred thirty-five million two hundred thirty-five thousand two hundred thirty-three"


Now that's cool.