午夜视频在线网站,日韩视频精品在线,中文字幕精品一区二区三区在线,在线播放精品,1024你懂我懂的旧版人,欧美日韩一级黄色片,一区二区三区在线观看视频

分享

Fortran編程BUG的都市傳說

 mtjs 2010-03-31

Fortran bug Urban Legend

In an earlier version of my Fortran language entry, I repeated the "well-known" Fortran bug that lost a spacecraft:

If a variable is not declared, it is implicitly given a type based on its first letter (I to N being integers, the rest floats). This led to the famous case of losing a spacecraft, when DO I = 1.100 was used instead of DO I = 1,100. The former statement assigns 1.100 to the variable DOI (spaces being ignored in names!), the latter is the start of a DO-loop.

However, on 25 February 1999, I received the following email from Brian Blank, which indicates that this well-known 'fact' is just an Urban Legend after all (which shows that I am just as guilty of repeating ULs as anyone):


Ordinarily I don't attempt to correct the web one fact at a time but a few days ago I received an email from a Belgian Scot who discovered one of my publicly accessible private pages via Alta Vista's infernal spider. It turns out that one of my computer factoids, the veracity of which I had confirmed in the Encyclopedia Britannica and the New York Public Library Science Desk Reference, was wrong. I learned some interesting things in verifying my correspondent's claim and feel quite content that I am no longer propagating a myth.

So either I am passing on a favor or seeking an outlet for revenge. The line of FORTRAN code

DO 10 I = 1.100
apparently did indeed occur. The compiler apparently did what it was supposed to do, ignoring white space and implicitly declaring and then assigning DO10I. Remarkably, the program was actually tested before use. The error was detected, thereby saving a rocket but ruining a future factoid. The demise of the rocket has been widely reported and has become part of programmer folklore.

Reference: Fortran Story - The Real Scoop, Forum on Risks to the Public in Computer and Related Systems, Vol. 9 #54, ACM Committee on Computers and Public Policy, 1989.

Regards

Brian Blank 
Department of Mathematics 
Washington University in St. Louis 
St. Louis, MO 63130 

email: brian@math. 
http://ascc.artsci./~bblank/


    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多