Re: value()
- Posted by jbrown1050 at hotpop.com Feb 18, 2003
- 397 views
On Tue, Feb 18, 2003 at 01:18:12AM +0000, Pete Lomax wrote: > > Hey gang , > > trying to parse STR, value(STR) is returning {GET_SUCCESS, SOMEVAL}. > > 1) is there any way to tell how much of STR value() "ate"? You'd have to modify the Get() procedure in get.e, to return the value of the integer string_next. (Or maybe get_ch(). I dunno.) Or, make the variable string_next global instead of local. Or add a new function to return the value of string_next() (and, if reading from a file, perhaps to return the value of where()). > > 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! Use sprint(), or get print.e (which makes a human-readable string, i.e. {65, 66, 67} becomes "ABC"). > > Pete > jbrown > ==^^=============================================================== > This email was sent to: jbrown1050 at hotpop.com > > > TOPICA - Start your own email discussion group. FREE! -- /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME |