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 DECTPU

Date:04/20/05
Author:Anonymous
URL:n/a
Comments:0
Info:n/a
Score: (3.00 in 2 votes)
DEC's Pascal-like "Text Processing Utility."

PROCEDURE BEER
          LOCAL BOTTLES, LINE_1, LINE_2, LINE_3;

          BOTTLES := 99;
          LINE_1 := "!SL bottle!%S of beer on the wall";
          LINE_2 := "!SL bottle!%S of beer,";
          LINE_3 := "If !0<!SL!>!1%Cthat single bottle"
                  + "!%Eone of those bottles!%F should happen to fall,";
          LOOP;
               COPY_TEXT( FAO( LINE_1, BOTTLES) + ","); SPLIT_LINE;
               COPY_TEXT( FAO( LINE_2, BOTTLES));       SPLIT_LINE;
               COPY_TEXT( FAO( LINE_3, BOTTLES));       SPLIT_LINE;
               BOTTLES := BOTTLES - 1;
               COPY_TEXT( FAO( LINE_1, BOTTLES) + "."); SPLIT_LINE;
SPLIT_LINE;
               EXITIF BOTTLES = 0;
          ENDLOOP;
ENDPROCEDURE

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: