Next Previous Contents

56. set_float_format

Synopsis

Set the format for printing floating point values.

Usage

set_float_format (String_Type fmt)

Description

The set_float_format function is used to set the floating point format to be used when floating point numbers are printed. The routines that use this are the traceback routines and the string function. The default value is "%f"

Example

     s = string (PI);                %  --> s = "3.14159"
     set_float_format ("%16.10f");
     s = string (PI);                %  --> s = "3.1415926536"
     set_float_format ("%10.6e");
     s = string (PI);                %  --> s = "3.141593e+00"
See Also

string, sprintf, double


Next Previous Contents