I have often said that my least-favorite feature of the Fortran language is “OPEN on a connected unit”. In most cases, programmers invoke this accidentally and are confused by its behavior. But it does provide a way to do something useful for which the language doesn’t provide an alternative. Let’s explore.
MoreDoctor Fortran in “Lest Old Acquaintance Be Forgot”
In some of my earlier posts I’ve discussed new features in the Fortran language that might be unfamiliar to some. But this time I’m going to go the other way and describe some really old language features – so old that many newer Fortran programmers are mystified when they see them – but these features are still supported by many current compilers, including Intel Fortran. So let’s set the Wayback Machine to the 1960s and have a look around.
MoreDoctor Fortran in “Revert! Revert! The End (of the format) is Nigh!”
Recently, a customer wrote that he wanted to write out the values of an array, all in one line, where the number of elements was not known at compile time. His first attempt at this was:
MoreDoctor Fortran – Something Old, Something New: Taking a new look at FORMAT
Most Fortran programmers of a “certain age” don’t give a lot of thought to the FORMAT statement – it’s been in the language “forever”, and many of us use only the capabilities that were provided by FORTRAN 77, or perhaps even FORTRAN IV. But as the Fortran standard has evolved, formats have too, and the Good Doctor decided it’s time to review what’s new in FORMAT since FORTRAN 77.
More