Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

PString::PString ( ConversionType  type,
double  value,
unsigned  places 
)

Parameters:
type  Type of data source for conversion.
value  Floating point value to convert.
places  Number of decimals in real number output.

Definition at line 1483 of file contain.cxx.

References sprintf().

{
  switch (type) {
    case Decimal :
      sprintf("%0.*f", (int)places, value);
      break;

    case Exponent :
      sprintf("%0.*e", (int)places, value);
      break;

    default :
      PAssertAlways(PInvalidParameter);
  }
}


Generated by  Doxygen 1.6.0   Back to index