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 Focal-8

Date:04/20/05
Author:Akira Kida
URL:n/a
Comments:2
Info:n/a
Score: (3.00 in 122 votes)
01.10 c Focal-8 version of 99 Bottles of beer
01.20 c Hacked by Akira KIDA, <SDI00379@niftyserve.or.jp>

10.10 set bottles = 99
10.20 do 20
10.30 quit

20.10 for i = bottles, 1, -1; do 30
20.20 return

30.10 set b = i
30.20 do 40 ; type " on the wall, "
30.30 do 40 ; type ".", ! , "Take one down, pass it around.", !
30.40 set b = i - 1
30.50 do 40 ; type " on the wall.", !, !
30.60 return

40.10 do 50
40.20 type " of beer"
40.30 return

50.10 if (b - 1) 50.20, 50.40, 50.60
50.20 type "No more bottles"
50.30 return
50.40 type %1.0, b, " bottle"
50.50 return
50.60 type %1.0, b, " bottles"
50.70 return

Download Source | Write Comment

Alternative Versions

Comments

>>  MA said on 09/01/08 16:09:13

MA Thanks for bringing back the memories, haven't used focal for over 30 years ;-)

>>  Dana said on 04/29/09 19:33:21

Dana WOW! I haven't seen Focal since high school! We had a 300-BAUD teletype dialup in the physics lab to a timeshared system somewhere off-campus. Was one of those 10-CPS, type-cylinder, paper tape units that sounded like a jackhammer when printing out a listing. I'm afraid I'm showing my age here but - Good memories.

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: