filepro quirk
Fairlight
fairlite at fairlite.com
Fri Oct 29 08:44:09 PDT 2004
You'll never BELIEVE what Kenneth Brody said here...:
> Fairlight wrote:
> [... COMPARE() ...]
> > I do note that the docs I just looked at said "with case sensitivity".
> > They don't go on to elaborate on whether the string lengths matter. Based
> > on the trinary nature of the return value, however, it looks like it works
> > much like perl's "cmp" operand, and should actually give the desired
> > results.
>
> What do your tests show? What does COMPARE("TX","TXA") return?
Uhm...I took his word for it that it works, after reading the
documentation. I didn't have an immediate need to test it. I may actually
eventually need to do this, however.
I'm just saying, the 'cmp' function I use for sort() in perl returns 1/0/-1
as well, so it sounds very similar.
> It doesn't take an extra line. It just means that instead of:
>
> If: compare(field1,field2)
>
> you need:
>
> If: compare(field1,field2) = "0"
>
> (Assuming you are comparing for equality only.)
I would be--anything else in string comparisons is useful only for sorting,
AFAIK. And thanks. I'll save this for reference as well. Cool!
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