Table of contents


NAME

stod - convert Fortran program from single-precision to double-precision

SYNOPSIS

stod < infile >outfile

stod copies its standard input to standard output, converting Fortran single-precision constants, built-in functions, and type declarations to double precision.

Floating-point FORMAT specifications are left intact; on some ancient systems, they may require modifications. They do not under the rules of Fortran 77.

Leading tabs are correctly interpreted according to common extended Fortran rules.

stod's other purpose is to demonstrate a modest lex(1) program.


BUGS

Undeclared variables are not type-converted. To find such instances, use the Extended PFORT Verifier, pfort(1), or the Fortran checker, forchek(1).

The input files should not contain any text past column 72; if they do, that text may be incorrectly wrapped onto continuation lines.

stod does not understand Fortran string constants, and may incorrectly do substitutions inside them. It is always a good idea to use diff(1) on the input and output files before accepting the conversion as correct.

stod does not handle embedded ASCII tab characters correctly when long lines are to be broken. A Fortran-sensitive detabbing utility should be applied first if the input file possibly contains embedded tabs. Note that expand(1) cannot be used to do this job correctly!

Similarly, multi-line strings may be disturbed if the processing changes their length, necessitating generation of an intermediate continuation line. Such instances are usually rare, and can be patched by hand.


SEE ALSO

dtos(1), forchek(1), lex(1), pfort(1).

AUTHOR

Nelson H. F. Beebe, Ph.D.

Center for Scientific Computing

Department of Mathematics

South Physics Building

University of Utah

Salt Lake City, UT 84112

Tel: (801) 581-5254

FAX: (801) 581-4148

Email: <beebe@science.utah.edu>