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 Lambda (DIAS)

(first entry)

Date:01/03/07
Author:Oliver Storch
URL:http://www.phoks.de
Comments:0
Info:http://pandora.inf.uni-jena.de/p/e/dias/dias1.html
Score: (1.67 in 6 votes)
/ 2006, Oliver Storch
/ written while getting in touch with the language lambda,
/ needed for a seminar in pattern recognition

+99=x
loop countdown n 1 99
	IF x<2 THEN
		PLF 1; OUT x; SOUT ^bottle of beer on the wall,|10|^
		OUT x; SOUT ^bottle of beer,|10|^
		SOUT ^     Take it down, and pass it around,|10|^
		SOUT ^     No more bottles of beer.^
	ELSE   
		OUT x; SOUT ^bottles of beer on the wall,|10|^
		OUT x; SOUT ^bottles of beer.|10|^
		SOUT ^     Take one down, and pass it around,|10|^
		+x-1=x
		IF x<2 THEN 
			OUT x; SOUT ^bottle of beer.|10|^
		ELSE
/ change last "0" of the following line to "1" for "less" output
			OUT x; SOUT ^bottles of beer.^; PLF 2 0
		ENDIF
	ENDIF
end countdown

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: