From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 9 Dec 92 06:02:18 GMT From: seas.gwu.edu!mfeldman@uunet.uu.net (Michael Feldman) Subject: Re: FORTRAN bug(was Re: C++ vs. Ada -- Is Ada loosing?) Message-ID: <1992Dec9.060218.23940@seas.gwu.edu> List-Id: In article <1992Dec8.172551.16780@newshost.lanl.gov> jlg@cochiti.lanl.gov (J. G iles) writes: [stuff deleted] > >Well, not quite. The proper moral is that all programming languages >(even informal specification languages) have contexts in which single >character errors can lead to linguistically correct programs which >don't compute the intended functionality. The moral often stated >instead is that this is a bad feature of Fortran. While Fortran >could indeed have been designed better, it is not the only language >with, or even the most severly affected by, this kind of problem. > You make a good point. Perhaps the modern equivalent of that Fortran single-keystroke bug is my favorite bit of C code (and no, I don't want to bash C, just point out how common these flukes are): int x; ... x = 1; while (x <= 10); { printf("%d\n", x); x++; } For 10 points on your grade: what is printed? Why? Try explaining it to a freshman. Any similar idiosyncracies in Ada? Mike Feldman ------------------------------------------------------------------------ Michael B. Feldman co-chair, SIGAda Education Committee Professor, Dept. of Electrical Engineering and Computer Science School of Engineering and Applied Science The George Washington University Washington, DC 20052 USA (202) 994-5253 (voice) (202) 994-5296 (fax) mfeldman@seas.gwu.edu (Internet) "Americans want the fruits of patience -- and they want them now." ------------------------------------------------------------------------