what -I- consider a bug in *cabe

John Esak john at valar.com
Sun Jun 3 18:38:33 PDT 2007



> -----Original Message-----
> From: filepro-list-bounces+john=valar.com at lists.celestial.com
> [mailto:filepro-list-bounces+john=valar.com at lists.celestial.com]On
> Behalf Of Kenneth Brody
> Sent: Sunday, June 03, 2007 9:05 PM
> To: filepro-list at lists.celestial.com
> Subject: Re: what -I- consider a bug in *cabe
> 
> 
> Quoting Jay R. Ashworth (Sun, 3 Jun 2007 10:26:43 -0400):
> 
> > On Sat, Jun 02, 2007 at 03:20:45PM -0400, Fairlight wrote:
> [...]
> > > required."  Emphasis on -sole string literal-.  I take your point
> > > about runtime expression evaluation, but if it were just a single
> > > string literal there, there's no evaluating to be done--it's correct
> > > or it's not.
> >
> > "a quoted literal that can only be numeric" is a syntactical particle
> > that... I don't think I've ever seen in any other language.  So it
> > doesn't surprise me that the lexer misses it.
> 
> Remember, the syntax says that an expression goes there.  A "single
> string literal" happens to be one type of expression.  The contents
> of that string are irrelevent to the syntax.
> 
> Now, should a semantic check be performed at compile time as well?
> It's possible to make an exception for the case of an expression
> being a "single string literal", but that would have to go beyond
> mere type-checking.  Remember, but "$" and "4" are simple literal
> strings.  The "4" is not a numeric field, but rather a string that
> happens to contain a value number.  How much checking should be
> performed?  Should SQRT("-1") be flagged at compile time as well?
> What about MID(field,"4.5","7.3")?
> 
> Should every place where an expression is allowed, check to see if
> that expression consists of a "single string literal", and validate
> the string at compile time?
> 
> --
> KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>

Didn't I say all that... almost exactly???  You must be bored.

:-)

John



More information about the Filepro-list mailing list