Ok, that won't work. First of all, str() is not a function. If I want to convert the float into a string, the conversion function will have to use some kind of numeric precision, which will screw things up. Consider this:
float f = 1.004; ostringstream s; s << f; cout << s.str(); The above code may produce "1.004", or "1.0040", or "1.00400", depending on the stream's precision setting. I need a way to detect the number of digits to the right of decimal point *prior* to doing any kind of string conversion. --Steve -- http://mail.python.org/mailman/listinfo/python-list