Learning FORTRAN In the Modern Era

后端 未结 10 550
既然无缘
既然无缘 2020-12-12 09:38

I\'ve recently come to maintain a large amount of scientific calculation-intensive FORTRAN code. I\'m having difficulties getting a handle on all of the, say, nuances, of a

10条回答
  •  轮回少年
    2020-12-12 10:12

    Well, in one sense, you're lucky, 'cause Fortran doesn't have much in the way of subtle flow-of-control constructs or inheritance or the like. On the other, it's got some truly amazing gotchas, like the arithmetically-calculated branch-to-numeric-label stuff, the implicitly-typed variables which don't require declaration, the lack of true keywords.

    I don't know about the "performance enhancing improvements". I'd guess most of them are probably ineffective, as a couple of decades of compiler technology have made most hinting unnecessary. Unfortunately, you'll probably have to leave things the way they are, unless you're planning to do a massive rewrite.

    Anyway, the core scientific calculation code should be fairly readable. Any programming language using infix arithmetic would be good preparation for reading Fortran's arithmetic and assignment code.

提交回复
热议问题