what -I- consider a bug in *cabe

Fairlight fairlite at fairlite.com
Sat Jun 2 02:12:21 PDT 2007


With neither thought nor caution, Kenneth Brody blurted:
> You do know that you can F8/Save from one, and F8/Load in another,
> don't you?

I do know that, but depending on the situation, it's almost as cumbersome
(sometimes moreso) than trying to use copy & paste.  At least for me.  Used
to use it, but haven't in ages.

> Because it's not a syntax error, any more than SQRT("-1") is a syntax
> error, or OPEN("c:\foo.txt","r") is a syntax error on Unix.
> 
> Are you passing a literal that is probably not what you meant?  Yes.
> Is it invalid syntax?  No.

>From the cabe help file:

         MID()              Finds and copies the middle of a field.
 
 
           Syntax
 
                a=MID(f,"s","n")
 
                 where f is a field, s is the starting position and n is the 
                 number of characters from the starting position.

It flat out says 'n' is the number of characters.  Context and common sense
indicate that 's' is likewise a -number- of characters into the string (ie.,
the starting position literally stated).

Thus, unless character number "$" is a valid starting position, it's a
syntax error in my book.  Since "$" isn't a number, that's always going to
be logically false, and thus always wrong.

I'm not likely to win this debate, so I'll just concede the point.
However, I did take exception with your logic, given the docs cited.

mark->
-- 
No matter what your problems, modern medicine can help!
http://members.iglou.com/fairlite/fixital/


More information about the Filepro-list mailing list