comp.lang.ada
 help / color / mirror / Atom feed
From: agate!spool.mu.edu!uwm.edu!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!mkso l!mccall@ucbvax.Berkeley.EDU  (fred j mccall 575-3539)
Subject: Re: FORTRAN bug(was Re: C++ vs. Ada -- Is Ada loosing?)
Date: 11 Dec 92 13:29:42 GMT	[thread overview]
Message-ID: <1992Dec11.132942.24054@mksol.dseg.ti.com> (raw)

In <1992Dec9.060218.23940@seas.gwu.edu> mfeldman@seas.gwu.edu (Michael Feldman)
 writes:

>In article <1992Dec8.172551.16780@newshost.lanl.gov> jlg@cochiti.lanl.gov (J. 
Giles) 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.

Nothing is printed.  You built an infinite loop.  This is hard to
understand?  You made a while loop with an empty body and a condition
that is never met because you never increment x.  Your freshmen don't
get this?

>Any similar idiosyncracies in Ada? 

Single character ones?  Probably not, but that just indicates that Ada
is incredibly more verbose than C.  One of the things I DISlike about
it, by the way.

-- 
"Insisting on perfect safety is for people who don't have the balls to live
 in the real world."   -- Mary Shafer, NASA Ames Dryden
------------------------------------------------------------------------------
Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.

             reply	other threads:[~1992-12-11 13:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-12-11 13:29 agate!spool.mu.edu!uwm.edu!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!mkso [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-12-18 21:56 FORTRAN bug(was Re: C++ vs. Ada -- Is Ada loosing?) Michael Feldman
1992-12-18  9:22 agate!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!caen!uvaarpa!vger.ns
1992-12-16 17:40 Pascal Obry
1992-12-16 16:02 fred j mccall 575-3539
1992-12-15 16:36 enterpoop.mit.edu!bloom-picayune.mit.edu!mintaka.lcs.mit.edu!ogicse!uwm.e
1992-12-15  2:57 Michael Feldman
1992-12-15  2:43 Michael Feldman
1992-12-14 22:15 John Bollenbacher
1992-12-14 18:33 J. Giles
1992-12-14 17:04 agate!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!csc.ti.com!til
1992-12-14 17:00 agate!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!mksol!mccall
1992-12-14 16:55 agate!spool.mu.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!mksol!mccall
1992-12-12 17:53 Michael Feldman
1992-12-12 14:34 Fergus Jam es HENDERSON
1992-12-12 14:20 Fergus Jam es HENDERSON
1992-12-12  6:04 Bob Kitzberger
1992-12-12  0:42 Pascal Obry
1992-12-11 23:22 Tucker Taft
1992-12-11 22:24 John Nestoriak III
1992-12-11 21:31 Michael Feldman
1992-12-11 21:04 Tucker Taft
1992-12-11 15:38 Robb Nebbe
1992-12-09  6:02 Michael Feldman
1992-12-08 17:25 J. Giles
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox