DTOQ 1L "27 April 1993"

Table of contents


DTOQ 1L "27 April 1993"

NAME

dtoq - convert Fortran program from double-precision to quadruple-precision

SYNOPSIS

dtoq < infile >outfile

dtoq copies its standard input to standard output, converting Fortran double-precision constants, built-in functions, and type declarations to quadruple 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.

dtoq recognizes all of the standard Fortran 77 double-precision functions, quadruple-precision extensions as well as the pair drand/qrand (UNIX pseudo-random number generators), and the pair d1mach/q1mach from the PORT library framework.

dtoq'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, ftnchek(1). Some UNIX Fortran compilers have a compile-time option, usually called -u, to flag undeclared variables.

Text beyond column 72 is discarded when lines are collected into Fortran statements.

dtoq 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!

Mixed-precision code may not be converted correctly. For example, DBLE(FLOAT(N)) will become DBLEQ(FLOAT(N)), which is syntactically incorrect.

Functions and variables of type COMPLEX are not converted, because Fortran 77 does not define a double precision complex type. Complex constants will be converted, however, since their real and imaginary parts look like normal floating-point values.


SEE ALSO

dtos(1), ftnchek(1), lex(1), pfort(1), qtod(1), stod(1).

AUTHOR

Nelson H. F. Beebe, Ph.D.

Center for Scientific Computing

Department of Mathematics

University of Utah

Salt Lake City, UT 84112

Tel: +1 801 581 5254

FAX: +1 801 581 4148

Email: <beebe@math.utah.edu>