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 TinyKiss

(Let's build a compiler!)

Date:02/13/06
Author:Marcel Hendrix
URL:http://home.iae.nl/users/mhx/index.html
Comments:0
Info:http://home.iae.nl/users/mhx/crenshaw/tiny.html
Score: (3.00 in 4 votes)
{ TinyKiss version of 99 Bottles of beer }

#include "tinykiss.lib"

procedure BOB (integer n) 
var string s;
BEGIN
  IF n  write(n); 
        IF n=1 s = ""; ELSE s="s"; ENDIF
  ELSE  write("no more"); s = "s";
  ENDIF write(" bottle" + s + " of beer")
END;

program sing;
BEGIN
  FOR 99 DOWNTO 1 STEP -1
      writeln(); 
      BOB(I); write(" on the wall, "); 
      BOB(I); write(".");
      writeln("Take one down, pass it around, ") 
      BOB(I-1); write(" on the wall.");
  ENDFOR   
END.

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: