Category Archives: Fortran

Fortran 90 pitfall: initialization of vars at declaration

I am dusting my Fortran 90 skills. One big gotcha that always leaves me baffled is the following. Suppose you write the following program program test   implicit none  call testsub() call testsub() end program subroutine testsub() implicit none integer :: var var = 0 print *, var var = 5 print *, var end [...]

Why is most science programming done in fortran?

I found this interesting question in the referral logs on ForTheScience. Why is most science programming done in Fortran (77 or 95)? After some thought, I can fill the following reasons: Fortran is simple to understand. Not the code itself maybe, but the style. The learning curve for doing something in Fortran is very low, [...]