- Sep 21, 2013
What is obvious to some may not be to others so here are a few more of my 3 AM thoughts...

It may simplify things to break up the logical test into parts. We have already seen that the AND operation is easy to work with so it's good to convert to all ANDs if possible. So if you are testing A AND B AND C AND (D OR E OR F), you could first create a temp variable

If (D+E+F) > 0 set T=1 else set T=0. Then you can do IfTrue(A*B*C*T)

I see no need to limit things to 0 and 1 as long as you remember to use comparisons instead of IfTrue\IfFalse.. The above could also be done as If (A*B*C*(D+E+F)) > 0 then it is True.

Also, to try to avoid NOTs, you just have to plan ahead a little. Here is a very simple example.

If you wanted to accept lines with at least 2 letters and 0 digits, you could do:

If <at least 2 letters> L=1 else L=0

If <digits exist> D=1 else D=0

Then you would have to test for L AND NOT D

BUT if you think in terms of what you want to accept and do

If <at least 2 letters> L=1 else L=0

If <digits exist> D=0 else D=1

Then you would only have to test for L AND D.

Unless you have some reason for doing so, I still say it's better to do one test at a time and skip as soon as a test fails.

I'm sure you have a good grip on this now and plenty to think about.

Joy

--- In ntb-clips@yahoogroups.com, <flo.gehrke@...> wrote:

> You want to find out how to do this Wayne's way and I'm saying

Art & Joy,

> this is a big mistake except for the simplest of cases.

Many thanks again for your contributions to this topic!

Obviously, I've been on the wrong track when looking for more complex expressions based on Wayne's concept. As Art put it...

> The VanWeerthuizenian Expressions get very messy

Your alternatives will provide a helpful basis for creating better solutions in a this field.

> very, very quickly once you go beyond the trivial

> two parameter, ...

Regards,

Flo - << Previous post in topic