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 User-RPL

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:1
Info:n/a
Score: (2.96 in 27 votes)
Here is a program in User-RPL (reverse polish language), a language 
used on HP calculators:

<< 99 2 FOR i
   i " bottles of beer on the wall," +
   1 DISP
   i " bottles of beer." +
   2 DISP
   "Take one down, pass it around," 3 DISP
   i 1 - " bottle" +
   IF i 2 > THEN "s" + END
   " of beer on the wall." +
   4 DISP
   -1 STEP
   "1 bottle of beer on the wall," 1 DISP
   "1 bottle of beer." 2 DISP
   "Take one down, pass it around." 3 DISP
   "No more bottles of beer on the wall." >>

Download Source | Write Comment

Alternative Versions

Comments

>>  Kiyoshi Akima said on 05/22/06 17:17:35

Kiyoshi Akima The program needs a '4 DISP' after the last line of the last verse.

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: