99 bottles of beer: Difference between revisions

Content deleted Content added
fix syntax highlighting
Gaham (talk | contribs)
 
(5 intermediate revisions by 3 users not shown)
Line 52:
=={{header|360 Assembly}}==
See [[99 Bottles of Beer/Assembly]]
 
=={{header|6502 Assembly}}==
See [[99 Bottles of Beer/Assembly]]
Line 66 ⟶ 65:
 
=={{header|8th}}==
<syntaxhighlight lang="factorforth">
\ 99 bottles of beer on the wall:
[
Line 93 ⟶ 92:
' beers 1 99 loop-
bye
</syntaxhighlight>
 
A more terse alternative:
 
<syntaxhighlight lang="forth">
 
[
( "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
(
dup lyrics [2,99] rot ' n:cmp a:pigeon w:exec
n:1- "Take one down, pass it around, %d bottles of beer on the wall.\n\n" s:strfmt .
) 1 99 loop-
 
"No more bottles of beer on the wall, no more bottles of beer.\n" . ;
 
</syntaxhighlight>
 
Line 3,678 ⟶ 3,696:
=={{header|Delphi}}==
See [[99 Bottles of Beer/Pascal]]
 
=={{header|DM}}==
Uses the [] variable insertion into strings, see [http://www.byond.com/docs/ref/#/DM/text]
 
/client/New()
..()
var/bottlestring
for(var/i in 99 to 0)
bottlestring = "[i || "No more"] Bottle[i != 1 ? "s" : ""] of Beer"
src << "[bottlestring] on the wall,"
src << "[bottlestring],"
src << "Take [i == 1 ? "it" : "one"] down, pass it around,"
src << "[bottlestring] on the wall,"
 
 
=={{header|Draco}}==