Fix indentation level authored by Sébastien Villemot's avatar Sébastien Villemot
...@@ -55,7 +55,7 @@ You should add the following notice in your files, just after the help text, but ...@@ -55,7 +55,7 @@ You should add the following notice in your files, just after the help text, but
% along with Dynare. If not, see <https://www.gnu.org/licenses/>. % along with Dynare. If not, see <https://www.gnu.org/licenses/>.
``` ```
# Short-circuit versus Element-wise logical AND/OR ## Short-circuit versus Element-wise logical AND/OR
The Short-circuit logical AND/OR (*i.e.* `&&`, `||`), returns `true` or `false`, depending on whether an entire expression evaluates to true or false. It returns this value as soon as it is known. On the other hand, the Element-wise AND/OR (*i.e.* `&`, `|`) returns a logical array of the compared values. Even though MATLAB and Octave substitutes in short-circuit functionality when an element-wise AND/OR is encountered in an `if` or `while` statement, Octave issues a warning every time this situation is encountered. Hence, in Dynare, all conditional statements should make use of the short-circuit logical AND and OR. The Short-circuit logical AND/OR (*i.e.* `&&`, `||`), returns `true` or `false`, depending on whether an entire expression evaluates to true or false. It returns this value as soon as it is known. On the other hand, the Element-wise AND/OR (*i.e.* `&`, `|`) returns a logical array of the compared values. Even though MATLAB and Octave substitutes in short-circuit functionality when an element-wise AND/OR is encountered in an `if` or `while` statement, Octave issues a warning every time this situation is encountered. Hence, in Dynare, all conditional statements should make use of the short-circuit logical AND and OR.
... ...
......