filepro quirk

Fairlight fairlite at fairlite.com
Thu Oct 28 14:27:18 PDT 2004


The honourable and venerable Laura Brody spoke thus:
> On Thu, 28 Oct 2004 14:23:52 -0400, Roger Cornelius <rac at custom-mobility.com> wrote:
> 
> > I've been absent from this list for awhile and have a couple of filepro
> > related questions.  The first is below.  I'll post the second
> > separately.
> >
> > dreport v 4.8.10D4 on SCO OSR5.0.7
> >
> > I have the following code:
> >
> >          If:
> >        Then: import WORD imp=(if)
> > 	   ...
> >
> >          If: imp(2) eq "TX"
> >        Then: gosub TXTYPE
> >          If: imp(2) eq "TXA"
> >        Then: gosub TXATYPE
> 
> 	Just swap the two elements so that you test for
> the longest string first. You would also do it this
> way if you were writing an edit which was trying to
> match "TXA" or "TX".
> 
> 	This partial matching is quite handy when you
> want to select records where a field starts with
> a value.

My $0.02 worth...

If they won't implement all of extended regexp's, shouldn't they at least
make a partial match a subset of 'co', with an ^ anchor, and let eq be
a true equality?  It's always been my opinion that "equals" should mean
"equals".

I could even accept the argument when the issue was brought up a few months
back and it concerned case sensitivity, I think, citing McKenzie, MCKENZIE,
etc.  I can see that on indexes, et al.  Okay, fine, valid point.

But cases sensitivity and giving a false positive based on differing
lengths are two totally different things.

Jay would probably have a field day with this.  I don't care all that
much, other than to say that I agree it is -not- what a programmer would
ordinarily expect from a test for equality.  It's more akin to "like 'TX%'"
in SQL.

That may be handy, but it's a pretty strange definition of equality, IMHO.

And out of curiosity, how would you "just" switch the order in which you
compare them, if they were not literal strings, but were actually values
contained in other variables--and, say...more than two of them.  You start
getting into matrix algorithms then, and that's particularly gruelling.

Maybe they just need a new operator "em" for "exact match" that accounts for
-exact- equality, both case, full length, etc.  

mark->
-- 
Bring the web-enabling power of OneGate to -your- filePro applications today!

Try the live filePro-based, OneGate-enabled demo at the following URL:
               http://www2.onnik.com/~fairlite/flfssindex.html


More information about the Filepro-list mailing list