|
|
On 2/16/23 19:56, Bald Eagle wrote:
> since a 3-term select statement is divided into 2 results: negative or
> ????.
Bill W (BE) explained well.
However, I'm going to re-state things because what showed up where I
have ???? characters above looks different on the web than what I see in
Thunderbird(a).
There are two forms of select(). The is a four term/argument version and
a three term version. The four term allows 'actions' for negative, zero
and positive input values. The three term one allows actions for
negative and (zero or positive) values.
I used the 4 term because I think it reads a little cleaner when setting
up a boolean test in the first term which can only return a zero or one
- the negative action is never used as Bill W said.
Aside: You can use the 3 term select depending upon a boolean result in
the first term test by doing something like:
select(1-(2*((x<0.0) | (x>1.0))), 0, 1)
I think this form less clear and, FWIW, it's slower than the four term
version.
Bill P.
(a) The leading '>' character got picked up as being an indication of
text from a previous post and is displaying as a vertical bar '|' in
Thunderbird.
Post a reply to this message
|
|