f77 infile [infile]* [option]* [runtime-file]*
(+|-)BCd (-) (+|-)Clear (-) (+|-)CoMmon (-) (+|-)CoNVert (+) (+|-)DeBug (-) (+|-)DeCLare (+) (+|-)DSS (-) (+|-)Extensions (+)(+|-)FDeBug (-) (+|-)FDS (-) (+|-)Formatted (+) (+|-)Go (+) (+|-)InFormation (+) (+|-)Include (+) (+|-)lineNumbers (-) (+|-)ListIng (-) (+|-)Load (+) (+|-)LstOu (-) (+|-)Map (-) (+|-)OneTrip (-) (+|-)Parmcheck (+) (+|-)SlowFormat (-) (+|-)Tables (+) (+|-)Value (+) (+|-)Warning (+) (+|-)Xref (-) (+|-)Zdebug (-) CoMmon=number Entry=symdef FFile=options Hstar=file (.h) Library=filename LoaderMemory=number MeMory=number (50) Name=name Object=filename Search=rule TEST=filename Time=number USe=symref Update=filename nn<[filename] nn>[filename]
f77 * Compile and run program in current file. f77 srcpart1 srcpart2 hstar=prog -go Compile an load program into file "prog". Don't run it. f77 prog 01</myfile 02>02 10< Run compiled program in "prog", redirecting some I/O. f77 /subra up=tlib +clear Build a library with the routines in "/subra".
For more information, see "expl f77 include".
F77 can compile and run Fortran programs. It can also restart a compiled program without recompiling.
F77 uses the DRL TASK interface to compile and load the program in batch, but execution takes place in TSS.
To rerun your program without recompiling it, give the name of the load module rather than a source file on the command line. The name of the load module will be ".h" unless you used the Hstar= option to give it a different name.
The default compilation options assume that your source program is in fixed format, i.e. it follows the usual Fortran rules:
There are two other formats accepted by the Fortran compiler: unnumbered free format and line-numbered free format.
To indicate unnumbered free format, specify the -Formatted option. With this format, a Fortran statement may start anywhere between columns 1 and 72. You indicate a continuation with an ampersand (&) as the first non-blank character on the line. You indicate a comment by a "*" as the first non-blank character. The compiler still ignores everything after column 72.
To indicate line-numbered free format, specify the +lineNumber option. This format is similar to unnumbered free format, except that each line must begin with a line number. This is useful for source files that were created with build mode. Lines may have any length; the compiler does NOT ignore text after column 72. Fortran column 1 is taken to be the first position after the line number. You need at least one space between the line number and any Fortran statement number.
In both free format modes, beware of starting a CALL, CHARACTER, or COMMON statement in column 1, since the compiler sees a C in column 1 and treats the statement as a comment. This also applies to assignment statements whose variables begin with C.
F77 lets you associate an I/O unit in your program with an actual file. You do this using a run-time file specifier of the form
nn<[filename] or nn>[filename]
where "nn" is a number representing an I/O unit. Each specifier may be used for one of three purposes:
A specifier with a "<" character is for reading only. A specifier with a ">" character is for reading or writing.
When your program contains a statement like
read(1,100)a,b
Fortran I/O attempts to read from file 01 in the AFT. Thus, the file associated with the unit must be in the AFT with an aftname that is the same as the file code, expressed as two digits. If it is not there, and you are reading, you will get a run-time error. If you are writing, the I/O package will create a temporary file using the unit number as the two-digit name. F77 lets you associate specific units with files or the terminal.
Suppose you wanted unit 01 to read from your file "data1". You would do this by including
01</data1
on the command line. In response to this, F77 accesses your file under the alternate name of "01". As long as you do not remove "01" from the AFT during the session, you do not have to specify this again, because F77 does not remove run-time files from the AFT. Thus, a basic run-time file specifier consists of a two-digit unit number (in the range 01 to 99), a "<" or ">" character, and a file name.
As already noted you must use ">" rather than "<" if your program needs to write on the file at any time. If you use ">" and the file does not already exist, the file will be created as either temporary or permanent, according to the usual conventions for implicit file creation.
For example, suppose you wish the output generated by unit 02 of your program to be directed to a temporary file called "02". You would specify
02>02
on the command line. Again, as long as you do not deaccess the file, you only need to specify this once during a session.
Fortran I/O associates units 05, 06, 41, and 42 with the terminal by default, while all other units are associated with a disk file. Unit 41 is used by a READ statement which has no unit number. Unit 42 is used by the PRINT statement.
To make a terminal-oriented unit read from a file, you must use a specifier in your F77 command. For example, to cause output on unit 06 to go to a file, you would say
06>/out1
This first creates "/out1" if necessary, then accesses "out1" under the alternate name of "06", then modifies the load module so that Fortran run-time initialization is aware of the deviation from the default. IMPORTANT NOTE: If you redirect 06 into a permanent file, you cannot look at the file until you issue the TSS command
remo 06
TSS does not update the "file is empty" bit for the file until the file is deaccessed, which happens when the file is removed from the AFT.
If you want Fortran I/O to read from the terminal instead of a disk file, just omit the file name altogether, as in
10<
This specifies that unit 10 is to be associated with the terminal instead of a disk file. When asking to use the terminal, you can specify either ">" or "<".
There is one nasty glitch in all this. If the file name you specify is a temporary file, the name must be the same as the unit with which the file is to be associated. If it is not, F77 will tell you that you must use the RENAME command yourself to change the name of the file. For example, if you want output unit 06 to go to a temporary file named "xxx", you must explicitly RENAME "xxx" to "06". This is necessary because it is not possible to have an alternate name for a temporary file.
For technically obscure reasons, you cannot use the +DeBug option with redirecting terminal I/O units. This means that if you use +DeBug, you cannot use "nn>" to redirect unit "nn" to the terminal, nor can you use "nn>file" to redirect unit 05, 06, 41 or 42 to a file. It is still possible to do these redirections using the FFile= option when loading with +DSS, but once the program has been loaded, you cannot change whether a unit goes to a terminal or a file (if you use the +DeBug option). This is only a problem with the DSS debugger. FDEBUG has no such problem.
The listing produced by the +ListIng option is left in your AFT with the name "fc*p*". This listing is in Media~3 format, print image BCD. If you wish to list this on the printer, simply use SLIST, as in
slist fc*p*
If you read "fc*p*" into FRED, you will find that each line ends with the cryptic notation "!10000". This happens because FRED is not fully at home with Media~3 files. To eliminate this odd glitch, you might use the L command to list "fc*p*" into another file (thereby performing BCD to ASCII conversion) and then read this converted file into FRED, as in
l fc*p* >temp fred r temp
You may specify additional F77 command options inside the source file itself, on a line that begins with "*!". The compiler ignores such lines because the "*" indicates a comment; however, F77 recognizes the "*!" sequence and scans the rest of the line for command options. A line of this form may have a line number, but the "!" must always be followed by at least one blank. There may be more than one such special comment line, but all must be together, starting with the first line of the file, as in
*! +form *! -linenum print,"hi there" stop end
When F77 scans a source file line for command options, it displays the line on the terminal. The -Include option tells F77 not to scan for such source file lines.
Options found in source files are processed in the order they appear on the terminal. Options on the command line (other than source or object file names) are processed last, permitting some degree of override on the options found in the source files. For instance, if a numeric or string-valued option like "Object=filename" is given more than once, F77 uses the numeric or string argument that is found last.
Normally when you compile a program, F77 assumes that you want the program loaded and executed. However, if you ask for an object deck, F77 only calls the loader if you also specify an option like Hstar= that directly applies to the loader. If you specify Update=, the library editor is called instead of the loader.
fb*b*, fc*p*, fc*s*, fc*j*, l*
fc*r*, fc*sc, fc*i*, fc**sr, fc**rl
cmdlib/etc/qstar
sys_software/lib_sr/fort77
.h
Copyright © 1996, Thinkage Ltd.