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 IITRAN

Date:10/27/08
Author:Allen J. Kapusta
URL:n/a
Comments:0
Info:n/a
Score: (2.00 in 1 votes)
%IITRAN
$ IITRAN PROGRAM TO PRINT '99 BOTTLES OF BEER' LYRICS
$ WRITTEN BY ALLEN J. KAPUSTA
$ IITRAN WAS USED IN THE INTRODUCTORY COMPUTER PROGRAMMING COURSE
$ AT ILLINOIS INSTITUTE OF TECHNOLOGY IN THE 1960S AND 1970S
$ IITRAN FOR THE UNIVAC 1108 DID NOT USE LOWER CASE LETTERS

PROCEDURE BOTTLES( I )
INTEGER I
IF I > 1
    PRINT I,' BOTTLES'
ELSE
    IF I = 1
        PRINT I,' BOTTLE'
    ELSE
        PRINT 'NO MORE BOTTLES'
PRINT ' OF BEER'
END BOTTLES

PROCEDURE VERSE( K )
INTEGER K
EXECUTE BOTTLES( K )
PRINT ' ON THE WALL, '
EXECUTE BOTTLES( K )
IF K >= 1
    DO
    PRINT '.',,'TAKE ONE DOWN AND PASS IT AROUND, '
$         AN EMPTY ARGUMENT TO PRINT CAUSES A NEW LINE TO BE STARTED
    EXECUTE BOTTLES( K - 1 )
    END
ELSE
    DO
    PRINT '.',,'GO TO THE STORE AND GET SOME MORE, '
    EXECUTE BOTTLES( 99 )
    END
PRINT ' ON THE WALL.'
PRINT ,,     $ A BLANK LINE
END VERSE

PROCEDURE LYRICS
INTEGER I
I == 100
UNTIL I < 1
    EXECUTE VERSE( I == I - 1 )
$         THE VALUE AFTER ASSIGNMENT IS PASSED TO THE PROCEDURE
END LYRICS

EXECUTE LYRICS
%EOF

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: