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 SM

(SuperMongo graphics language)

Date:03/05/07
Author:Gary Mamon
URL:n/a
Comments:0
Info:http://www.astro.princeton.edu/~rhl/sm/
Score: (3.02 in 118 votes)
99bottles # sing song 99 bottles of beer on the wall
		define n 99
		set i = 1, $n
		set bottle = i == 1 ? 'bottle' : 'bottles'
		define bottle bottles
		while {$n > 0} {
			echo $n $bottle of beer on the wall,
			echo $n $bottle of beer,
			echo take one down, pass it around,
			if ($n == 1) {
				echo no more bottles of beer on the wall.
				return
			} 
			define n ($n-1)
			define bottle (bottle[$n-1])
			echo $n $bottle of beer on the wall.
			echo
		}

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: