Language Cold Fusion
(UDF version)
Date: | 04/20/05 |
Author: | S. Isaac Dealey |
URL: | n/a |
Comments: | 2 |
Info: | n/a |
Score: | (2.90 in 10 votes) |
By S. Isaac Dealey <cfscript> function beerSong(x) { b = iif(x gt 1, DE("bottles"), DE("bottle")); if (x) { WriteOutput("#x# #b# of beer on the wall...<br>#x# #b# of beer!</br>"); WriteOutput("Take one down, pass it around...<br>"; beerSong( x - 1 ); } else { WriteOutput("No bottles of beer on the wall"); } } beerSong(99); </cfscript>
Download Source | Write Comment
Alternative Versions
Version | Author | Date | Comments | Rate |
---|---|---|---|---|
standard version | Steven Reich, Michael Dinowitz | 04/20/05 | 2 | |
cfscript | S. Isaac Dealey | 04/20/05 | 1 |
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
Al said on 02/25/07 07:16:49
ColdFusion is more properly written as one word, with the "F" capitalized.
ES said on 04/11/07 16:31:33
Isaac, this doesn't have the right output... You are missing the fourth line of the verse. Also the third line of the verse has no close paren "".
Typical CF developer...