On Sun, Jan 02, 2011 at 05:29:08PM +0100, Arnold Nipper wrote: > It looks like BIRD logical && operator is not doing a shortcut. I.e even > if you have s.th. like > > if 0 && $some_complex_expression then ... > if 1 || $some_complex_expression then ... > > BIRD will try to evaluate $some_complex_expression. Would really be > great if you could short cut this as you may have situations where the > first expression already is false while trying to evaluate 2nd > expression may lead to run time errors in that case. In this case you > would have to use a nested "if first_expression then if 2nd_expression > then" instead of "if first_expression && 2nd_expression then"
You are right, short-circuit evaluation is probably a better behavior. I will look at that and probably change that. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santi...@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
signature.asc
Description: Digital signature