www.delorie.com/gnu/docs/gcc/g77_632.html   search  
 
Buy the book!


Using and Porting GNU Fortran

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

15.3.49 Better List-directed I/O

Values output using list-directed I/O (`PRINT *, R, D') should be written with a field width, precision, and so on appropriate for the type (precision) of each value.

(Currently, no distinction is made between single-precision and double-precision values by libf2c.)

It is likely this item will require the libg77 project to be undertaken.

In the meantime, use of formatted I/O is recommended. While it might be of little consolation, g77 does support `FORMAT(F<WIDTH>.4)', for example, as long as `WIDTH' is defined as a named constant (via PARAMETER). That at least allows some compile-time specification of the precision of a data type, perhaps controlled by preprocessing directives.


  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003