Go to the first, previous, next, last section, table of contents.


Checking Columns in Fortran

C-c C-r
Display a "column ruler" momentarily above the current line (fortran-column-ruler).
C-c C-w
Split the current window horizontally temporarily so that it is 72 columns wide. This may help you avoid making lines longer than the 72-character limit that some Fortran compilers impose (fortran-window-create-momentarily).

The command C-c C-r (fortran-column-ruler) shows a column ruler momentarily above the current line. The comment ruler is two lines of text that show you the locations of columns with special significance in Fortran programs. Square brackets show the limits of the columns for line numbers, and curly brackets show the limits of the columns for the statement body. Column numbers appear above them.

Note that the column numbers count from zero, as always in GNU Emacs. As a result, the numbers may be one less than those you are familiar with; but the positions they indicate in the line are standard for Fortran.

The text used to display the column ruler depends on the value of the variable indent-tabs-mode. If indent-tabs-mode is nil, then the value of the variable fortran-column-ruler-fixed is used as the column ruler. Otherwise, the variable fortran-column-ruler-tab is displayed. By changing these variables, you can change the column ruler display.

For even more help, use C-c C-w (fortran-window-create), a command which splits the current window horizontally, making a window 72 columns wide. By editing in this window you can immediately see when you make a line too wide to be correct Fortran.


Go to the first, previous, next, last section, table of contents.