99 bottles of beer: Difference between revisions
original code no longer compiled - replaced with most current example found in 8th's samples folder
(PascalABC.NET) |
(original code no longer compiled - replaced with most current example found in 8th's samples folder) |
||
Line 68:
<syntaxhighlight lang="forth">
\ 99 bottles of beer on the wall:
: allout "no more bottles" ;▼
: yeah! dup . " bottles" ;▼
[
] var, bottles
: .bottles
: .wall .beer " on the wall" . ;▼
: .take " Take one down and pass it around" . ;▼
: beers .wall ", " . .beer '; putc cr▼
n:1- 0 max .take ", " . ▼
.wall '. putc cr drop ;▼
: .beer
' beers 1 99 loop- bye▼
.bottles . " of beer" . ;
: .wall
: .take
: beers
bye
</syntaxhighlight>
=={{header|AArch64 Assembly}}==
{{works with|as|Raspberry Pi 3B version Buster 64 bits}}
|