|
From: | Ed Meyer |
Subject: | Re: short-circuit ops |
Date: | Sat, 29 Sep 2012 19:45:14 -0700 |
I understand that I can switch off the warning, but what I'm saying is that accordingHi Julio,
to matlab's documentation they don't do what this message claims, namely short-circuit
single-character boolean ops:
http://www.mathworks.com/help/matlab/ref/logicaloperatorselementwise.htmlI think the documentation is consistent, according to your link, MATLAB will never short-circuit & or | except when inside if/while expressions.If i understood correctly, these operators *never* short-circuit in Octave, unless you ask it for:do_braindead_shortcircuit_evaluation (1) % be weird like MATLABSince short-circuit can be achieved with other operators safely (&& and ||) in both interpreters, they are preferred.Regards,Júlio.
[Prev in Thread] | Current Thread | [Next in Thread] |