int OR(array x) { return search(`!(x[*]),0) == -1; } int AND(array x) { return sizeof(`!(x[*]) - ({0})); }
There are many other ways of course. Calling `! on each element allows for x->`!() to be evaluated.
/ Fredrik (Naranek) Hubinette (pappa)
Previous text:
2004-09-27 00:10: Subject: Re: is there a `||()
thank you, that was the answer i was looking for. i didn't understand why at first, but while writing to explain how i don't understand why the semantics are different, i realized that for OR(a, b) both a AND be must be evaluated, but for (a||b) this is not the case.
now, anyone have a suggestion how to solve an equivalent of: `|(@array(int)) with array(mixed)? i could write a helper function, but maybe there is a neat shortcut somewhere.
greetings, martin.
/ Brevbäraren