Article View: alt.folklore.computers
Article #325Re: COBOL program
From: l... Liam R. E. Quin
Date: Sun, 17 Dec 1989 22:45
Date: Sun, 17 Dec 1989 22:45
30 lines
1866 bytes
1866 bytes
In article <5...@enea.se> som...@enea.se (Erland Sommarskog) writes: >tom reingold (t...@bellcore.com) writes: >>I heard in the folklore that once a COBOL programmer wrote a program >>with the sequence below. Forgive the syntax because I don't know >>COBOL. (Big loss!) It's an approximation. >>... >> IF I = 1 THEN ADD 1 TO COUNTER. >> IF I = 2 THEN ADD 2 TO COUNTER. >I have actually seen such a program. It was not Cobol, but Fortran Perhaps we all have... Jon Bentley's `Programming Pearls' contains this and a number of other anedotes. The COBOL program he describes had to read numbers in the range 1..500 and print out how many of each it had seen -- the program was a little over 1500 lines long: 500 initialisations, 500 IF statements and 500 print statements. There is a new volume, `More Porgramming Pearls' which is (I think) somewhat thinner, but still an excellent read. The new volume includes the anecdote about the persone who could only log on when he was standing up, not when seated (no, I won't explain... read the book!). Lee -- Liam R. Quin, l...@sq.com Until Dec. 20th (visiting sq, not an employee) After Dec 20, Unixsys (UK) Ltd, Knutsford, UK -- +44 565 50021 At home: +44 925 831084 (0830 GMT to midnight GMT only please...) rn: .signature: cannot open: no such fire or dirigible
Technical Details
Message-ID:
<1989Dec17.224505.27032@sq.sq.com>Path:
mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!hoptoad!utzoo!censor!geac!sq!leeReferences:
<18494@bellcore.bellcore.com> <552@enea.se>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!hoptoad!utzoo!censor!geac!sq!lee From: l...@sq.sq.com (Liam R. E. Quin) Newsgroups: alt.folklore.computers Subject: Re: COBOL program Message-ID: <1989Dec17.224505.27032@sq.sq.com> Date: 17 Dec 89 22:45:05 GMT References: <18494@bellcore.bellcore.com> <552@enea.se> Reply-To: l...@sq.com (Liam R. E. Quin) Organization: Unixsys (UK) Ltd Lines: 30 Posted: Sun Dec 17 23:45:05 1989 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit