99 bottles of beer: Difference between revisions
added more terse alternative
(DM) |
(added more terse alternative) |
||
Line 66:
=={{header|8th}}==
<syntaxhighlight lang="
\ 99 bottles of beer on the wall:
[
Line 93:
' beers 1 99 loop-
bye
</syntaxhighlight>
A more terse alternative:
<syntaxhighlight lang="forth">
[ ( "No more bottles of beer on the wall, no more bottles of beer.\n" . ),
( "Just one more bottle of beer on the wall, one bottle of beer.\n" . ),
( I dup "%d bottles of beer on the wall, %d bottles of beer.\n" s:strfmt . ) ] constant lyrics
: app:main
( lyrics [1,2,99] rot ' n:cmp a:pigeon w:exec I if
I n:1- "Take one down, pass it around, %d bottles of beer on the wall.\n\n" s:strfmt .
then
) 0 99 loop- ;
</syntaxhighlight>
|