Re: Proposal for a (small) enhancement to the value() function.

new topic     » goto parent     » topic index » view thread      » older message » newer message

CChris wrote:

> Juergen Luethje wrote:
> > 
> > CChris wrote:
> > 
> > > Currently, value(), defined in get.e, takes a sequence and returns {status
> > > code,
> > > value read}.
> > > The proposed enhancement is to return 
> > > {status code,
> > >  value read,
> > >  number of characters read,
> > >  number of leading whitespace characters}.
> > > 
> > > This can be done at the cost of creating a duplicated, slightly modified
> > > copy
> > > of the internal Get() function, so that performance won't be affacted at
> > > all.
> > > get() won't be affected, since where() will give you most of the same
> > > information.
> > > 
> > > Any thoughts? issues? other suggestions?
> > > CChris
> > 
> > Why?
> > 
> > Regards,
> >    Juergen

I'm sorry, I better should have written a whole sentence. smile
My intended question was: Why do you want to change the value() function in the
proposed way?

> Because, when you wish to process text, you have to search for some free
> format
> stuff and replace only the exact right portion by something. value() currently
> does not return the information, but it is hidden in local vars in get.e. The
> idea is simply to make the extra information available, as it is sometimes
> useful.
> I have quite often wished I didn't have to code my own version of value() for
> that purpose.

I think that I still don't understand. As far as I can see, value() is not meant
for
text processing or text parsing, but just for conversion of strings such as
"12345"
to numeric values.

<snip>

Regards,
   Juergen

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu