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 Lasso 9

Date:08/10/10
Author:Jonathan Guthrie
URL:http://www.treefrog.ca
Comments:0
Info:http://www.lassosoft.com
Score: (3.00 in 33 votes)
[

	/* ------------------------------------------------------------------
	
	Lasso 9
	
	Jonathan Guthrie
	Treefrog Interactive
	Newmarket, ON, Canada
	
	For more information about Lasso, please visit http://www.lassosoft.com/
	
	------------------------------------------------------------------ */

	define beer99 => type { 
		data 
			public beer = 99
	
	    public s() => { .beer != 1 ? return 's' }
	    
	    public run() => {
			local(out = string)
	
			while(.beer) => {
				#out += '<p>'
				#out += .beer + ' bottle' + .s + ' of beer on the wall,<br />'
				#out += .beer+' bottle' + .s + ' of beer;<br />'
				--.beer
				#out += 'Take one down, pass it around,<br />'
				#out += .beer +' bottle' + .s +' of beer on the wall.'
				#out += '</p>'	
			}
			return #out
	    }
	}
	
	local(beerwall = beer99)
	#beerwall->run

]

Download Source | Write Comment

Alternative Versions

Comments

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: