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 MivaScript

Date:04/20/05
Author:Darren Ehlers
URL:n/a
Comments:2
Info:n/a
Score: (3.00 in 2 votes)
<MvCOMMENT> MivaScript version of 99 Bottles of beer</MvCOMMENT>
<MvCOMMENT> See http://www.miva.com/ </MvCOMMENT> 
<MvCOMMENT> Darren Ehlers, http://www.ehlersconsulting.net </MvCOMMENT> 

<MvASSIGN NAME = "l.b" VALUE = "{ 99 }">
<MvWHILE EXPR = "{ l.b LT 0 }">
  <MvEVAL EXPR = "{ l.b $ ' bottle(s) of beer on the wall,<BR>' }">
  <MvEVAL EXPR = "{ l.b $ ' bottle(s) of beer.<BR>' }">
  <MvEVAL EXPR = "{ 'Take one down, pass it around,<BR>' }">
  <MvASSIGN NAME = "l.b" VALUE = "{ l.b - 1 }">
  <MvEVAL EXPR = "{ l.b $ ' bottle(s) of beer on the wall.<BR><BR>' }">
</MvWHILE>

Download Source | Write Comment

Alternative Versions

Comments

>>  Chuck Lasker said on 06/23/06 00:27:22

Chuck Lasker Wow. This is really great. Really.

>>  Richard Grevers said on 02/21/09 11:01:31

Richard Grevers The second-to-last line should be replaced by
<MvIF EXPR="{l.b GT 0}>
<MvEVAL EXPR = "{ l.b $ ' bottle(s) of beer on the wall.<BR><BR>' }">
<MvELSE>
<MvEVAL EXPR= "No more bottles of beer.">
<MvWHILESTOP>
</MvIF>

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: