If you use %g, numbers will be output in a compact format when it can and,
when numbers are very small or large, in scientific notation otherwise.
Adrian
"Lionel" < XXXX@XXXXX.COM > wrote in message
news:516001c3b2a3$3703b8b0$ XXXX@XXXXX.COM ...
> I'm using the CStrings' Format function to convert a float
> to a CString as follows:
>
> ValueString.Format("%#.2f",FloatValue);//Convert value.
>
> Sometimes my numbers are very large or small and in these
> cases I would like to use scientific notation. Is there a
> way to convert the floats to scientific notation CStrings?