Language tbpl
(tbpl rc-0.997 20061112)
Date: | 11/12/06 |
Author: | kmeaw |
URL: | http://kmeaw.com/ |
Comments: | 0 |
Info: | http://tbpl.info/ |
Score: | (3.00 in 4 votes) |
*CBottle = CClass new implements: { self 'toString = { self bottles > 1 then "\{self bottles} bottles" :else self bottles == 1 then "\{self bottles} bottle" else "no more bottles" }; }; CBottle 'initialize = { self 'bottles = 99; }; *beer = CBottle new; { io <<< "\{beer} of beer on the wall, \{beer} of beer."; io << "Take one down and pass it around, "; beer bottles -= 1; io <<< "\{beer} bottles of beer on the wall."; } while { beer bottles > 0 }; io <<< $(No more bottles of beer on the wall, no more bottles of beer. Go to the store and buy some more, 99 bottles of beer on the wall.);
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments