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 VICC

Date:04/20/05
Author:Juha Autero
URL:n/a
Comments:0
Info:n/a
Score: (2.15 in 13 votes)
// 99 Bottles of Beer in VICC = VICC's Intended for Compiler Courses
// (C) 1996 Juha Autero

DEFINE nl(tabify : Int) : Int
  IF tabify != 0 THEN
    WriteString("\n\t");
  ELSE
    WriteString("\n");
  END;
  RETURN 0;
END;

DEFINE beer(b : Int) : Int
  WriteInt(b);
  WriteString(" bottles of beer");
  RETURN 0;
END;

DEFINE Main() : Int
  DEFINE i : Int;
  i := 99;
  WHILE i >= 1 DO
    nl(1);
    beer(i);
    WriteString(" on the wall,");
    nl(1);
    beer(i);    
    WriteString(".");
    nl(1);
    WriteString("Take one down, pass it around");
    nl(1);
    beer(i - 1);
    WriteString(" on the wall.");
    nl(0);
    i := i - 1;
  DONE;
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: