Language RealBasic
Date: | 04/20/05 |
Author: | Anonymous |
URL: | n/a |
Comments: | 2 |
Info: | http://www.realsoftware.com/ |
Score: | ![]() |
// "99 Bottles of Beer on the Wall" for RealBasic (http://www.realsoftware.com/) // Written by Uriah Carpenter // To run add the below code to the "Open" event of a listbox dim bottles as integer dim plural as string bottles = 99 plural = "s" do me.addRow(str(bottles) + " bottle" + plural + " of beer on the wall, " + str(bottles) + " bottle" + plural + " of beer.") bottles = bottles - 1 if bottles = 1 then plural = "" else plural = "s" end if me.addRow("Take one down, pass it around, " + str(bottles) + " bottle" + plural + " of beer on the wall.") loop until bottles = 0
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
dim plural as string = "s"
do until bottles = 0
me.addRow(str(bottles) + " bottle" + plural + " of beer on the wall, " +
str(bottles) + " bottle" + plural + " of beer."
if bottles > 1 then
me.addRow("Take one down, pass it around, " + str(bottles) + " bottle" + plural + " of beer on the wall."
else
plural = ""
me.addRow("There's no more bottles of beer on the wall, No more bottles of beer."
me.addRow("Go to the store and get some more, there's 99 bottles of beer on the wall."
end
bottles = bottles - 1
loop