Names to numbers: Difference between revisions
m
→{{header|Quackery}}: fixed indentation
(→{{header|Quackery}}: simplified) |
m (→{{header|Quackery}}: fixed indentation) |
||
Line 1,936:
Finally, the compiled nest is executed with <code>do</code>.
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
▲ [ 90 + ] is ninety ( --> n )
[ 100 * ] is hundred ( n --> n )
[ 1000 * ] is thousand ( n --> n )
[ thousand thousand ] is million ( n --> n )
[ thousand million ] is billion ( n --> n )
[ 0 0 ] is {{ ( --> n n )
[ + 0 ] is , ( n n --> n n )
[ + ] is }} ( n n --> n )
[ $ "{{ " swap
witheach
[ dup char , = if
[ dip space join ]
join ]
$ " }}" join
Line 1,987 ⟶ 1,986:
else
[ nested join ] ]
do ] is name->number ( $ --> n )
$ "one billion, two hundred and thirty four million, five hundred and sixty seven thousand, eight hundred and ninety"
|