Language DarkBasic
Date: | 04/20/05 |
Author: | Philipp Winterberg |
URL: | http://www.winterbergs.de/ |
Comments: | 7 |
Info: | http://www.darkbasic.com/download.php |
Score: | ![]() |
rem DarkBasic version of 99 Bottles of beer (Bottles.dba) rem http://www.darkbasic.com/download.php rem Philipp Winterberg, http://www.winterbergs.de a$=" bottle(s) of beer" : c$=" on the wall" for b=99 to 1 step -1 print b, a$, c$, "," print b, a$, "." print "Take one down, pass it around," print b-1, a$, c$, "." wait (1000) : cls rgb(0,0,0) next b : end
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
a$=" bottle(s) of beer" : c$=" on the wall"
for b=99 to 1 step -1
print b, a$, c$, ","
print b, a$, "."
print "Take one down, pass it around,"
print b-1, a$, c$, "."
wait (1000) : cls rgb(0,0,0)
BUG=RAND(1000)
IF BUG>2 SHOW MESSAGE "UNKNOWN ERROR!"
next b : end
"BUG=RAND(1000)
IF BUG>2 SHOW MESSAGE "UNKNOWN ERROR!""
lol noob
global t$ as string
for bottles=99 to 1 step -1
t$=isPlural(bottles)
t$=t$+" of beer on the wall"
print t$;", ";t$
print "Take one down and pass it around, ";
if bottles-1>0
print isPlural(bottles-1);
print " of beer on the wall"
else
print "No more bottles of beer on the wall"
endif
sync
next bottles
print "No more bottles of beer on the wall, no more bottles of beer."
print "Go to the store and buy some more, 99 bottles of beer on the wall..."
wait key
end
function isPlural(bottles as integer)
local temp$ as string
temp$=str$(bottles)+" bottle"
if bottles>1
temp$=temp$+"s"
endif
endfunction temp$
with the do loop function.
Code:
beer = 99
Do
if beer = 0 then exit
if beer > 1
print beer+" bottles of beer on the wall"
Print beer+" bottles of beer"
else
print beer+" bottle of beer on the wall"
Print beer+" bottle of beer"
endif
print "take one down pass it arrount"
wait 2000
beer = beer - 1
cls
loop
cls
print "And that's the end of the song"
sync on:sync rate 0:hide mouse
alc=99:time=210
do
time=time-1
if time<0 then time=210:dec alc, 1:cls: print "YOU TAKE ONE DOWN AND PASS IT AROUND!!!":wait 1000
cls:set cursor rnd(3)+1,rnd(3)+1
if time>0 then cls:print alc,"BOTTLES OF BEER ON THE WALL!!!"
sync
loop
expression or two. Geez Louise..........