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 BlitzMax

(Uses some BlitzMax advaantages)

Date:05/25/07
Author:Nicholas Kingsley
URL:http://www.nicholaskingsley.co.uk
Comments:4
Info:http://www.blitzmax.com
Score: (3.00 in 25 votes)
' This takes advantages of some BlitzMax features - auto conversion of integers
' to strings, for example.

Strict

Local t$
Local bottles:Int

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)+" of beer on the wall"+Chr(10)
   Else
      Print "No more bottles of beer on the wall"+Chr(10)
   EndIf
Next

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..."
End


Function isPlural:String(bottles:Int)
Local temp$

   temp$=bottles+" bottle"
   If bottles>1
      temp$=temp$+"s"
   EndIf

	Return temp$
EndFunction

Download Source | Write Comment

Alternative Versions

Comments

>>  Zakk said on 01/24/10 13:09:02

Zakk Why not just use SuperStrict? It looks compatible enough.

>>  Nicholas Kingsley said on 04/20/10 02:18:12

Nicholas Kingsley Would have been a good idea when I originally wrote it...

>>  JamieKnight35 said on 05/23/10 03:47:51

JamieKnight35 I had a dream to start my organization, however I did not have got enough amount of cash to do it. Thank heaven my mate advised to use the <a href="http://lowest-rate-loans.com/topics/credit-loans">credit loans</a>. Therefore I took the student loan and made real my desire.

>>  HollandMaude24 said on 05/24/10 08:42:32

HollandMaude24 That's great that people are able to get the <a href="http://lowest-rate-loans.com/topics/business-loans">business loans</a> moreover, that opens up completely new opportunities.

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: