Fortran notes for Meteo 6150 (revised 10/99) ------------------------------------------------------------------------ enscript enscript prints a file in a specified format to your default printer. To print a file two pages per sheet in landscape format, use enscript -2r This is very handy for Fortran code. ------------------------------------------------------------------------ f77 To run Fortran on a Sun workstation, use the command f77. Type f77 -help for a list of options. Type man f77 for more details. .f source files .o object files (created by f77 compiler) a.out executable file (default name) (created by f77 loader) Some useful f77 options: -ansi Report non-ANSI (non-standard) extensions. -c Compile only - produce .o files, suppress linking -native Optimize for the host system -o Specify name of object (with -c) or executable to be written -u Report on use of undeclared variables ------------------------------------------------------------------------ error error analyzes error messages produced by a number of com- pilers and language processors. It replaces the painful, traditional methods of scribbling abbreviations of errors on paper, and permits error messages and source code to be viewed simultaneously. Example: f77 -c program.f |& error -q -v error inserts error messages into program.f Options: -n Do not touch any files; all error messages are sent to the standard output. -q error asks whether the file should be touched. A `y' or `n' to the question is necessary to con- tinue. Absence of the -q option implies that all referenced files (except those referring to dis- carded error messages) are to be touched. -v After all files have been touched, overlay the visual editor vi with it set up to edit all files touched, and positioned in the first touched file at the first error. ------------------------------------------------------------------------