Re: Proposal for a (small) enhancement to the value() function.
- Posted by Bernie Ryan <xotron at bluefrog.com> Jun 25, 2007
- 700 views
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? Chris: I would rather that value() function just return the value instead of sequence. The failure should fail within function with a message. In my experience of using the value() I have never taken taken any other action to the failure of the function except report the error and end my program. Why should a user have to write extra testing code just to use a basic function. This testing becomes a pain in the neck especially if do a great number of calls to value(). Bernie My files in archive: WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API Can be downloaded here: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan