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

后端 未结 5 2141
青春惊慌失措
青春惊慌失措 2020-12-03 12:14

In the book Fortran 95/2003 for Scientists and Engineers, there is much talk given to the importance of recognizing that the first column in a format statement is reserved f

5条回答
  •  青春惊慌失措
    2020-12-03 12:47

    Carriage control characters were defined for output to printers. Output to other kinds of devices (for example punched cards, paper tape, or those newfangled magnetic rotating roundy things) didn't have them. If your output goes to a disk file then gfortran is doing the right thing.

    Edit: gfortran is really doing the right thing. If you want to command a printer driver to interpret Fortran carriage control characters instead of printing them literally, say so in the lpr command by using the f filter option. See for example http://www.computerhope.com/unix/ulpr.htm

提交回复
热议问题