Are Fortran control characters (carriage control) still implemented in compilers?

In years past, ignoring this use of the first column could cause bad things on a line printer, like page ejects — but when was the last time that you saw a line printer? Otherwise it was output device, compiler and OS dependent. The advice of “Fortran 95/2003 for Scientists and Engineers” was excellent for about 15 or 20 years ago. With terminals, postscript and other modern printers, column one isn’t special any more. I don’t pay special attention to column one anymore and I haven’t gotten into trouble.

The Fortran 2003 standard lists carriage control as deleted, which is something that the Fortran language standards rarely do. See page 359 of “Fortran 95/2003 explained” or page 326 of “The Fortran 2003 Handbook”. Perhaps selecting -std=f2003 or -std=f2008 with gfortran will guarantee that column 1 won’t be used a carriage control so that “bad things” are completely impossible.

Leave a Comment