Comment

Video: Tea Party Convention Attendees Speak

431
SixDegrees2/13/2010 3:23:24 pm PST

re: #396 Charles

When I learned a bit of Fortran years ago, it still had vestiges of its punch card origins — commands had to be preceded by six spaces, because that’s how the cards were punched. I think there are compiler options in more modern versions that let you turn off this odd requirement.

Most modern Fortran compilers have compiler options that allow you to turn the old behavior on - it’s off by default, and allows free-form formatting.

Where Fortran really puzzles newer programmers is in it’s treatment of arrays - their indexing is 1-based in Fortran, rather than 0-based as it is in most other languages; and two-dimensional arrays are laid out in memory in column-major order, rather than the row-major order used by Pascal, C and C++. This can easily trip up the unwary, and does take some getting used to.