.! .! RUNOFF source file for F2C.HLP .! .! This is a RUNOFF input file which will produce a VMS help file .! for the VMS HELP library. The file was derived from the original .! Unix man page for f2c and modified as necessary to be useful .! under VMS. Site dependent information in the help file will be .! prefixed with a comment section which starts with NOTE ---. This .! information should be changed to reflect the installation of f2c .! at your site. .! .! Date of last revision: June 4, 1990 .! .! .! Robert Schneider .! Department of Petroleum Engineering .! The University of Texas at Austin .! .! .literal ! ! Thinking about editing this file???? DON'T!!!! Edit F2C.RNH ! to make the changes you need and then use RUNOFF on your ! modified help file. ! .end literal .no paging .no flags all .right margin 70 .left margin 1 .indent -1 1 f2c .skip F2c converts Fortran 77 source code in file to C ( or C++ ) a source file in the current directory, with .C substituted for the file type extension. If no Fortran files are named, f2c reads Fortran from standard input and writes C to standard output. File names that end with .P are taken to be prototype files, as produced by option -P, and are read first. .skip Format: .skip .indent +3 $ f2c [options ...] file .skip f2c is compiled with VAXC which converts uppercase command line arguments to lowercase. To pass an uppercase argument or a negation argument to f2c, the argument must be enclosed in quotation marks ( .ie. "-C" or "-!bs" ). Arguments enclosed in brackets ( [ ] ) are optional. .indent -1 2 Options .skip Options -C, -I2, -onetrip, -U, -u and -w have the same meaning as f77(1) on Unix systems. All other options are peculiar to f2c. .indent -1 3 -C .skip Compile code to check that subscripts are within declared array bounds. .indent -1 3 -I2 .skip Render INTEGER and LOGICAL as short, INTEGER*4 as long int. Assume the default F2CLIB.OLB library: allow only INTEGER*4 (and no LOGICAL) variables in INQUIREs. Option -I4 confirms the default rendering of INTEGER as long int. .indent -1 3 -onetrip .skip Compile DO loops that are performed at least once if reached. (Fortran 77 DO loops are not performed at all if the upper limit is smaller than the lower limit.) .indent -1 3 -U .skip Honor the case of variable and external names. Fortran keywords must be in lower case. .indent -1 3 -u .skip Make the default type of a variable `undefined' rather than using the default Fortran rules. .indent -1 3 -w .skip Suppress all warning messages. If the option is -w66, only Fortran 66 compatability warnings are suppressed. .indent -1 3 -A .skip Produce ANSI C. Default is old-style C. .indent -1 3 -a .skip Make local variables automatic rather than static unless they appear in a "DATA, EQUIVALENCE, NAMELIST," or SAVE statement. .indent -1 3 -C++ .skip Output C++ code. .indent -1 3 -c .skip Include original Fortran source as comments. .indent -1 3 -E .skip Declare uninitialized COMMON to be Extern (overridably defined in f2c.h as extern). .indent -1 3 -ec .skip Place uninitialized COMMON blocks in separate files: COMMON /ABC/ appears in file abc_com.c. Option -e1c bundles the separate files into the output file, with comments that give an unbundling sed(1) script. .indent -1 3 -ext .skip Complain about f77(1) extensions. .indent -1 3 -g .skip Include original Fortran line numbers as comments. .indent -1 3 -h .skip Try to align character strings on word (or, if the option is -hd, on double-word) boundaries. .indent -1 3 -i2 .skip Similar to -I2, but assume a modified F2CLIB.OLB library (compiled with -Df2c_i2 ), so INTEGER and LOGICAL variables may be assigned by INQUIRE. .indent -1 3 -kr .skip Use temporary values to enforce Fortran expression evaluation where K&R (first edition) parenthesization rules allow rearrangement. If the option is -krd, use double precision temporaries even for single-precision operands. .indent -1 3 -P .skip Write a file.P of ANSI (or C++) prototypes for procedures defined in each input file.f or file.F. When reading Fortran from standard input, write prototypes at the beginning of standard output. Implies -A unless option -C++ is present. Option -Ps implies -P, and gives exit status 4 if rerunning f2c may change prototypes or declarations. .indent -1 3 -p .skip Supply preprocessor definitions to make common-block members look like local variables. .indent -1 3 -R .skip Do not promote REAL functions and operations to DOUBLE PRECISION. Option -!R confirms the default, which imitates f77. .indent -1 3 -r8 .skip Promote REAL to DOUBLE PRECISION, COMPLEX to DOUBLE COMPLEX. .indent -1 3 -T dir .skip Put temporary files in directory dir. .indent -1 -w8 .skip Suppress warnings when COMMON or EQUIVALENCE forces odd-word alignment of doubles. .indent -1 3 -W n .skip Assume n characters/word (default 4) when initializing numeric variables with character data. .indent -1 3 -z .skip Do not implicitly recognize DOUBLE COMPLEX. .indent -1 3 -!bs .skip Do not recognize backslash escapes (\bs ", \bs ', \bs 0, \bs \bs , \bs b, \bs f, \bs n, \bs r, \bs t, \bs v) in character strings. .indent -1 3 -!c .skip Inhibit C output, but produce -P output. .indent -1 3 -!I .skip Reject include statements. .indent -1 3 -!it .skip Don't infer types of untyped EXTERNAL procedures from use as parameters to previously defined or prototyped procedures. .indent -1 3 -!P .skip Do not attempt to infer ANSI or C++ prototypes from usage. .indent -1 2 Linking .skip The resulting C invokes the support routines of f77; object code should be linked with the f2c support library as well as the VAXC run-time library. The appropriate LINK command under VMS would be; .skip .! .! NOTE --- Where do you keep the necessary support library for f2c? .! We keep ours in SYS$PUBLIC. .! .center $ LINK file,SYS$PUBLIC:F2CLIB/LIB,SYS$LIBRARY:VAXCRTL/LIB .skip Calling conventions are those of f77: see the reference below. .indent -1 2 Files .skip The following files are used by f2c; .skip .! .! NOTE --- Where do you keep the necessary header and library .! files? We keep them in SYS$PUBLIC:. .! .literal file.[f][F][for][FOR] input file *.c output file SYS_$PUBLIC:F2C.H header file SYS_$PUBLIC:F2CLIB.OLB intrinsic function library and Fortran I/O library SYS_$LIBRARY:VAXCRTL.OLB C run-time support library .end literal .indent -1 2 See Also .skip S. I. Feldman and P. J. Weinberger, `A Portable Fortran 77 Compiler', UNIX Time Sharing System Programmer's Manual, Tenth Edition, Volume 2, AT\&T Bell Laboratories, 1990. .skip You should also read the technical report on f2c from AT&T which provides a more detailed explanation of f2c. This file is normally found in .! .! NOTE --- Where do you keep your documentation files. .! SYS$DOC:F2C_TECHNICAL_REPORT.PS. .indent -1 2 Diagnostics .skip The diagnostics produced by f2c are intended to be self-explanatory. .indent -1 2 Bugs .skip Floating-point constant expressions are simplified in the floating-point arithmetic of the machine running f2c, so they are typically accurate to at most 16 or 17 decimal places. .skip Untypable EXTERNAL functions are declared int. .indent -1 2 Author .skip F2c was written at AT&T Bell Laboratories.