J
James Aguilar
Suppose that I want to get the or of several values. Which of these ways
would be better?
bool test = false;
test = fn1() || test;
test = fn2() || test;
test = fn3() || test;
test = fn4() || test;
Or
bool test = fn1() | fn2() | fn3() | fn4();
Assume that each fn type function does stuff that needs to be done all the
time -- in other words, even if it returns false, it is useful.
- James
would be better?
bool test = false;
test = fn1() || test;
test = fn2() || test;
test = fn3() || test;
test = fn4() || test;
Or
bool test = fn1() | fn2() | fn3() | fn4();
Assume that each fn type function does stuff that needs to be done all the
time -- in other words, even if it returns false, it is useful.
- James