

William F Pokorny <ano### [at] anonymousorg> wrote:
>
> I'm going to restate things because what showed up where I
> have ???? characters above looks different on the web than what I see in
> Thunderbird(a).
No problem at my end; I see the correct syntax in the web portal.
Sorry for my longerthanusualdelay in responding; I had to think hard about
this 'negative option being ignored' thing, and the difference between a 3part
vs. 4part select(). I was still thinking about it when I feel asleep last
night! William P's function construct makes better sense to me now; I finally
had the 'flashing insight'.
docs for the 4part select:
When used with four parameters, if A < 0 it will return B. If A = 0 it will
return C. Else it will return D (A > 0).
I had to work out my own rather pedantic 'truth table' of sorts, as I see it 
hopefully corrected this time

Given ((x<0.0)  (x>1.0)) as the first argument 'A':
The boolean results in parentheses are only ever 0 or 1 (true or false).
if x is indeed less than 0.0 OR greater than 1.0, that produces boolean TRUE (or
1) in the parentheses. Compared against select's 'zero by definition' for A, 1
is 'greater than zero'. So according to the rules, the outcome of select() will
be argument D the f_boom macro. Effectively, it doesn't matter if x exceeds
either limit; the result will be TRUE in either case.
If x is exactly 0.0 *or inside the given range*, the boolean operation in
parentheses produces FALSE (or 0). But, for select's argument A
comparison, 'zero equals zero'  and argument C is chosen, which is 0.0 in
William P's code and 0.3 in mine.

So far, argument B is never chosen; C and D take care of every possible outcome
of ((x<0.0)  (x>1.0))
HOWEVER, I see now that a simpler 3part select() would not work when using
argument A as written because of the 3part rules: Argument B is only chosen
when argument A is *less than* 0, which never occurs with ((x<0.0)  (x>1.0))
Post a reply to this message

