using pipe in conditions
Jeff Harrison
jeffaharrison at yahoo.com
Tue Jan 30 20:36:14 PST 2007
--- Scott Nelson <scott at logicdatasystems.com> wrote:
> Just wondering......
>
> I have seen the pipe used in ' if: not aa co "a|b|c"
> ' - to test if aa
> does not contain a or b or c.
>
> Why not as ' if: aa eq "a|b|c" ' - to shorten the
> condition line,
> instead of ' if: aa eq "a" or aa eq "b" or aa eq
> "c"
>
> ???
>
> Thanks,
>
> Scott Nelson
>
Actually, the following is acceptable in filepro:
if: "a|b|c" co aa
Now, it can get slightly more complicated if you are
dealing with fields of different lengths, so you may
want to modify this slightly as in:
if: "|a|b|c|" co ("|"{aa{"|")
Jeff Harrison
jeffaharrison at yahoo.com
Author of JHImport and JHExport. The fastest and
easiest ways to create code for filePro Imports and
Exports.
____________________________________________________________________________________
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
http://autos.yahoo.com/green_center/
More information about the Filepro-list
mailing list