Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language W-Langage

Date:03/11/12
Author:ABDev
URL:http://www.meetgeek.info
Comments:0
Info:http://www.windev.com/
Score: (3.00 in 6 votes)
BottlesTotal is int = 99
LyricFirstLine is string = "%1 bottle%2 of beer on the wall, %3 bottle%4 of beer." + CR
LyricSecondLine is string = "Take one down and pass it around, %5 bottle%6 of beer on the wall." +
CR + CR
EndOfSong is boolean = False

WHILE BottlesTotal > 2
	Trace(StringBuild(LyricFirstLine + LyricSecondLine, BottlesTotal, "s", BottlesTotal, "s",
BottlesTotal - 1, "s"))
	BottlesTotal--
	Info(BottlesTotal)
END

IF BottlesTotal = 2 THEN
	Trace(StringBuild(LyricFirstLine + LyricSecondLine, BottlesTotal, "s", BottlesTotal, "s",
BottlesTotal - 1, ""))
	BottlesTotal--
	Info(BottlesTotal)
END

IF BottlesTotal = 1 THEN
	Trace(StringBuild(LyricFirstLine + LyricSecondLine, BottlesTotal, "", BottlesTotal, "", "no more",
"s"))
	EndOfSong = True
	Info(BottlesTotal)
END

IF EndOfSong THEN Trace(StringBuild(LyricFirstLine + "Go to the store and buy some more, 99 bottles
of beer on the wall.", "No more", "s", "no more", "s"))

Download Source | Write Comment

Alternative Versions

Comments

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!

Name:

eMail:

URL:

Security Code:
  
Comment: