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 OOSL

Date:10/07/11
Author:Henrique Leme
URL:http://3wcom.com.br
Comments:0
Info:http://oosl.sourceforge.net/
Score: (3.00 in 1 votes)
\bottle method
	exch dup 1 equal if out pop " bottle" out else
	dup 0 equal if pop if "N" else "n" endif "o more" concat else
	exch pop endif " bottles" concat out endif endmethod
\beer method
	bottle " of beer" out endmethod
\wall method
	beer " on the wall" out endmethod
\first method
	dup 1 wall ", " out 0 beer "." outcr endmethod
\second method
	dup 0 equal if "Go to the store and buy some more, " out
	pop 99 else "Take one down and pass it around, " out
	1 sub endif 0 wall "." outcr endmethod
99 do dup first dup second dup if "" outcr 1 sub continue endif enddo pop

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: