From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a37:464a:: with SMTP id t71mr16150150qka.436.1565315856104; Thu, 08 Aug 2019 18:57:36 -0700 (PDT) X-Received: by 2002:a9d:5618:: with SMTP id e24mr16065288oti.5.1565315855846; Thu, 08 Aug 2019 18:57:35 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!b26no2092110qtq.0!news-out.google.com!d29ni43qtg.1!nntp.google.com!b26no2092107qtq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 8 Aug 2019 18:57:35 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=202.67.103.232; posting-account=S_MdrwoAAAD7T2pxG2e393dk6y0tc0Le NNTP-Posting-Host: 202.67.103.232 References: <1992Dec4.141816.1@happy.colorado.edu> <86986725-f34e-46d7-9efc-d15d94379048@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <97509e4d-05b9-4b6a-ab12-613abbe562b0@googlegroups.com> Subject: Re: Mariner 1 / FORTRAN bug From: robin.vowels@gmail.com Injection-Date: Fri, 09 Aug 2019 01:57:36 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:57014 Date: 2019-08-08T18:57:35-07:00 List-Id: On Friday, August 9, 2019 at 3:26:30 AM UTC+10, Jeffrey R. Carter wrote: > On 8/8/19 5:40 PM, r......@gmail.com wrote: > > > > DO 15 I = 1.100 > > > > when what should have been written was: > > > > DO 15 I = 1,100 > > > > but somehow a dot had replaced the comma. Because Fortran ignores spaces, this was seen by the compiler as: > > > > DO15I = 1.100 > > which is a perfectly valid assignment to a variable called DO15I and not at all what was intended." > > Some people on here may not be aware that FORTRAN did not require declaration of > variables, It still doesn't. > so the above would create a new variable DO15I. I don't know what > flavor of FORTRAN was used in Mariner 1, Marina 1 (1962) preceded FORTRAN 66. > but FORTRAN 66 added the IMPLICIT > statement, which declared the type used for undeclared variables. Adding > IMPLICIT LOGICAL A-Z at the beginning of your code helped to catch these kinds > of things. FORTRAN 77 added IMPLICIT NONE, which required you to declare all > variables. IMPLICIT NONE is an optional statement. If is is omitted, variables do not need to be declared. > Sometime in the late 1970s-early 1980s people moved away from punched > cards in ALL UPPER CASE and started calling the language Fortran. > > Given the kind of testing such software would have undergone, I somehow doubt > that an absence of looping would have gone unnoticed, If you read further on past the referenced article, you will see that the looping DID go unnoticed. [try google] > so I suspect this story is > apocryphal. It wasn't. > While it probably didn't cause the failure of a space probe, people > did get bitten by this language design flaw, which is an example of a > single-character error (added, omitted, or changed) that results in valid > code. Single-character errors are still possible, whatever the language. > This is something that competent language designers go to great lengths to > avoid. Note that C and most of its descendants (most of the commonly used > languages today) have this flaw.