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 HotBasic

(Different,using a Do-Loop & Select/Case)

Date:10/02/05
Author:AirrSongs
URL:http://www.airsys.com
Comments:1
Info:http://www.hotbaic.org
Score: (2.26 in 19 votes)
$apptype console:$typecheck on

defstr BeerOnWall = " of Beer on the wall"
defstr TakeOne = "Take one down, pass it around,"
defbyte count = 99

do 
  select case count
    case > 1
      print count;space;"bottles";BeerOnWall;","
      print count;space;"bottles";Left$(BeerOnWall,8);",";crlf;TakeOne
      if not (count-1) = 1 then 
        print count-1;space;"bottles";BeerOnWall;crlf
      else
        print count-1;space;"bottle";BeerOnWall;crlf
      end if
      dec(count)

    case else
      print count;space;"bottle";BeerOnWall;","
      print count;space;"bottle";Left$(BeerOnWall,8);",";crlf;TakeOne
      print count-1;space;"bottles";BeerOnWall;"!";crlf;crlf
      dec(count)
  end select
loop until count = zero

pause
end

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
GUI VersionAirrSongs10/04/050
2Joe B.04/20/051

Comments

>>  AirrSongs said on 10/02/05 18:15:21

AirrSongs URL's should be:

http://www.airsys.org

http://www.hotbasic.org

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: