Re: get() and value()
- Posted by Robert Craig <rds at ??pidEuphoria.com> Aug 23, 2007
- 570 views
CChris wrote: > Since no one has made any comment on this for the last 8 days or perhaps more, > I'm going to proceed... > > * get() and value() will keep returning a 2 element sequence. I don't think anyone will disagree with that. > * get() and value() accept embedded comments in sequence - they crash in > official > Eu, which some don't see as a bug; > * get() and value() ignore leading top level comments. Commments start by "--" > and end a a \n or \r character, or at end of input; I don't think anyone will mind if comments in the input data are accepted, and ignored. I've actually had occasions where I would have liked to add comments to my input data. > * a new value_from(sequence s,integer starting_point) will allow to scan a > sequence > from a starting point between 1 and length(s). This function returns a 4 > element > sequence: first two as value(), total character read, leading whitespace. Sounds useful. > * There's no symmetric get_from(), as it would reduce to a possibly > inefficient > sequence of seek() and get(), unless there's some demand for it. OK. > Additionally, the possibility exists for all of the above to return a new > error > code when no value is read and end of input is reached, as opposed to having > read an unfinished value string. Currently, GET_EOF is returned in both case. > Adding the extra error code would remove 4-5 lines of code from get.e. Is this > to be considered? Sounds OK. > I'll update the whole thing tonight (4pm now). Go ahead with all of this, unless someone seriously disagrees very soon. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com