Learning FORTRAN In the Modern Era

后端 未结 10 549
既然无缘
既然无缘 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:06

    Here's another one that has bit me from time to time. When you are working on FORTRAN code make sure you skip all six initial columns. Every once and a while, I'll only get the code indented five spaces and nothing works. At first glance everything seems okay and then I finally realize that all the lines are starting in column 6 instead of column 7.

    For anyone not familiar with FORTRAN, the first 5 columns are for line numbers (=labels), the 6th column is for a continuation character in case you have a line longer than 80 characters (just put something here and the compiler knows that this line is actually part of the one before it) and code always starts in column 7.

提交回复
热议问题