Language BASIC
Date: | 05/27/05 |
Author: | M. Eric Carr |
URL: | n/a |
Comments: | 12 |
Info: | n/a |
Score: | ![]() |
10 REM Basic version of 99 bottles of beer 20 REM Modified by M. Eric Carr (eric@carrnet.net) 30 REM from prior version found on this site. 40 REM (Modified to correct "1 bottle" grammar) 50 FOR X=99 TO 1 STEP -1 60 PRINT X;"bottle"; 70 IF X<>1 THEN PRINT "s"; 80 PRINT " of beer on the wall,";X;"bottle"; 90 IF X<>1 THEN PRINT "s"; 100 PRINT " of beer" 110 PRINT "Take one down and pass it around," 120 PRINT X-1;"bottle"; 130 IF X<>1 THEN PRINT "s"; 140 PRINT " of beer on the wall" 150 NEXT
Download Source | Write Comment
Alternative Versions
Version | Author | Date | Comments | Rate |
---|---|---|---|---|
TRS-80 LEVEL 1 | barrym | 04/01/10 | 2 | ![]() ![]() |
trs-80 color computer | barrym | 06/10/10 | 0 | ![]() ![]() |
Atari 8Bit | barrym | 04/05/10 | 2 | ![]() ![]() |
TI99/4A EXTENDED | barrym | 06/26/10 | 0 | ![]() ![]() |
5 | Anonymous | 04/20/05 | 2 | ![]() ![]() |
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
This particular code looks way too much like something I'd have written for this, too. Argh. Flashbacks.
130 IF X<>1 THEN PRINT "s";
Sorry 'bout that. Good catch.
...and yes, it would be more universal to write
150 NEXT X
--Eric
So it doesn't factorize so easily.
Either way, that program doesn't print the reference lyrics.
go to the store, buy some more..."
20 FOR X=99 TO 0 STEP -1
30 ProcStr$=X;"bottles of beer"
40 IF X=1 THEN ProcStr$="1 bottle of beer"
50 IF X=0 THEN ProcStr$="No more bottles of beer"
60 IF X<>99 THEN "Take one down and pass it around,";ProcStr$;"on the wall."
70 PRINT ProcStr$;"on the wall,";ProcStr$;"."
80 NEXT X
90 PRINT "Go to the store and buy some more, 99 bottles of beer on the wall."
You assclown, this is rubbish im dissapinted in you sonny jim. Please Note:THIS IS FAKE
Some BASIC doesn't support "long" variable and only supporte one char variable...
For proof, see my Level 1 Basic example (Level 1 has VERY primitive string
capabilities, so in that case the decision was made for me!)
instead of you. Your version simply should be revised to finish the song properly!
I (and several others) have encountered the frustration of submitting an example
with a typo or an omission, and feeling like I was going to have to see the error
posted in all of its glory forever! The web masters may someday decide to let us
perform our own revisions and view the list of candidates in the submission queue
for peer approval. Someday ... maybe?