99 bottles of beer: Difference between revisions
Content added Content deleted
Line 4,095: | Line 4,095: | ||
end |
end |
||
fun subject = text by block do return when(me.bottlesCount == 1, "bottle", "bottles") end |
fun subject = text by block do return when(me.bottlesCount == 1, "bottle", "bottles") end |
||
fun bottles = text by block do return when(me.bottlesCount == 0, " |
fun bottles = text by block do return when(me.bottlesCount == 0, "no more", text!me.bottlesCount) end |
||
fun goToWall = void by block |
fun goToWall = void by block |
||
text line = me.bottles() + " " + me.subject() + " of beer on the wall, " + |
text line = me.bottles() + " " + me.subject() + " of beer on the wall, " + |
||
me.bottles() + " " + me.subject() + " of beer." |
me.bottles() + " " + me.subject() + " of beer." |
||
if me.bottlesCount == 0 do line[0] = line[0].upper() end # text can be modified |
|||
writeLine(line) |
writeLine(line) |
||
end |
end |
||
Line 4,131: | Line 4,132: | ||
1 bottle of beer on the wall, 1 bottle of beer. |
1 bottle of beer on the wall, 1 bottle of beer. |
||
Take one down and pass it around, |
Take one down and pass it around, no more bottles of beer on the wall. |
||
No more bottles of beer on the wall, |
No more bottles of beer on the wall, no more bottles of beer. |
||
Go to the store and buy some more, 2 bottles of beer on the wall. |
Go to the store and buy some more, 2 bottles of beer on the wall. |
||
</pre> |
</pre> |