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 Genie

(new language)

Date:12/21/05
Author:Ian Reid
URL:http://www.geol.ku.dk
Comments:0
Info:n/a
Score: (3.03 in 117 votes)
#  GENIE (GENeric Interpreter and Evaluator) is an interpreted
#  scripting language from the Geological Institute, Copenhagen University. 
#  For information, contact Ian Reid (idr@geol.ku.dk)

b ob otw c s = "bottle" "of beer" "on the wall" "," "."
define n[m][n]
	if [m] > 0 [m] else if [m] = 0 [n]"o more" else 99 
define s[n]
	if [n] = 1 else "s"
define action[n]
	if [n] > 0 "Take" one[[n]] "down and pass it around"
	else "Go to the store and buy some more"
define one[n]
	if [n] = 1 "it" else "one"

for n from 99 to 0 step -1
	print n[n]["N"] bs[n] ob otwc n[n]["n"] bs[n] obs
	print action[n]c n[n-1]["n"] bs[n-1] ob otws<-

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: