VARKON Version 1.15 1997-10-24
outflt - Procedure
Write float to a file
Description
Converts a float to a string, formats and writes the result to an open file or pipe.
Syntax
outflt(f, x, width, precision)
FILE f; FLOAT x; INT width; INT precision;
Principal parameters
f - The name of a filevariable accociated with a file open for write, append or update (W, A or U) x - The float to write
Optional parameters
width - Controls the amount of padding. If width is less than the actual space required no padding is performed. If width is larger than the space required the result is padded with blanks. The sign of width controls weather padding is done on the left side of the result (+) or the right side (-). precision - Controls the number of decimal places. A value of -1 gives E-notation.
Examples
See the in-memory float to string conversion routine str() for examples.