Fw: value()
- Posted by Derek Parnell <ddparnell at bigpond.com> Feb 18, 2003
- 445 views
On Tue, 18 Feb 2003 13:50:48 +1100, Derek Parnell <ddparnell at bigpond.com> wrote: > > Actually, "%g" truncates digits so I never use it anymore. > I stand corrected. I haven't been using "%g" correctly all this time. This will work for both integers and floating point values... x = sprintf("%.16g",SOMEVAL) It displays it at maximum precision which is 16 digits with trailing zeros removed and leading spaces removed. -- cheers, Derek Parnell