⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m1

📁 unix v7是最后一个广泛发布的研究型UNIX版本
💻
字号:
.nr PS 9.nr VS 11.if t .2C.if n .ls 2.NHINTRODUCTION.PPMost programmers will agree that Fortran isan unpleasant language to program in,yet there are many occasions when they are forced to use it.For example, Fortran is often the only languagethoroughly supported on the local computer.Indeed, it is the closest thing to a universal programming languagecurrently available:with care it is possible to write large, truly portableFortran programs[1].Finally, Fortran is often the most ``efficient'' languageavailable, particularly for programs requiring much computation..PPBut Fortran .ulisunpleasant.Perhaps the worst deficiency is inthe control flowstatements_ conditional branches and loops _which express the logic of the program.The conditional statements in Fortran are primitive.The Arithmetic .UC IFforces the user into at least two statement numbers andtwo (implied) .UC GOTO 's;it leads to unintelligible code, and is eschewed by good programmers.The Logical.UC IFis better, in that the test part can be stated clearly,but hopelessly restrictive because the statementthat follows the.UC IFcan only be one Fortran statement(with some.ulfurtherrestrictions!).And of course there can be no.UC ELSEpart to a Fortran.UC IF :there is no way to specify an alternative action if the.UC IFis not satisfied..PPThe Fortran.UC DOrestricts the user to going forward in an arithmetic progression.It is fine for ``1 to N in steps of 1 (or 2 or ...)'',but there is no direct way to go backwards,or even (in ANSI Fortran[2]) to go from 1 to.if n N-1..if t N\(mi1.And of course the.UC DOis useless if one's problem doesn't map into an arithmetic progression..PPThe result of these failings is that Fortran programsmust be written with numerous labels and branches.The resulting code isparticularly difficult to read and understand,and thus hard to debug and modify..PPWhen one is faced with an unpleasant language,a useful technique is to definea new language that overcomes the deficiencies,and to translate it into the unpleasant onewith a preprocessor.This is the approach taken with Ratfor.(The preprocessor idea is of course not new,and preprocessors for Fortran are especially populartoday.A recent listing [3] of preprocessors shows more than 50, of which at least half a dozen are widely available.)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -