Re: value()
- Posted by Derek Parnell <ddparnell at bigpond.com> Feb 18, 2003
- 414 views
On Tue, 18 Feb 2003 02:36:14 +0000, Pete Lomax <petelomax at blueyonder.co.uk> wrote: > > On Mon, 17 Feb 2003 21:16:47 -0500, Robert Elia > <bobelia200 at netzero.net> wrote: > >>> trying to parse STR, value(STR) is returning {GET_SUCCESS, SOMEVAL}. >>> >>> 2) what is the simplest way to get SOMEVAL as returned back from >>> value() into a character string again? I'll do it if I have to, no >>> worry, but there just *must* be a better way than puts(fn,SOMEVAL) and >>> reading it back in again! >> >> Regarding point 2): Use x = sprintf( "%d", {SOMEVAL} ). > > Sorry, SOMEVAL may be integer, for which the above works fine, or a > float, for which %g works fine, Actually, "%g" truncates digits so I never use it anymore. > but I really should have said it is > sequences on which I'm stumped. Thanks anyway Bob. The print() routine might be what you are looking for. -- cheers, Derek Parnell