# HG changeset patch # User John W. Eaton # Date 1411324839 14400 # Node ID cbd55a4e549b16b9dacf35f31e2f9a7c07cda81b # Parent 90421e725f1d2271fac78a6e8cb2da5ec7299fa0 update documentation for do_braindead_shortcircuit_evaluation (bug #43177) diff -r 90421e725f1d -r cbd55a4e549b doc/interpreter/expr.txi --- a/doc/interpreter/expr.txi Sun Sep 21 14:38:29 2014 -0400 +++ b/doc/interpreter/expr.txi Sun Sep 21 14:40:39 2014 -0400 @@ -1009,10 +1009,10 @@ @sc{matlab} has special behavior that allows the operators @samp{&} and @samp{|} to short-circuit when used in the truth expression for @code{if} and -@code{while} statements. The Octave parser may be instructed to behave in the -same manner, but its use is strongly discouraged. - -@DOCSTRING(do_braindead_shortcircuit_evaluation) +@code{while} statements. Octave also behaves the same way by default, +though the use of the @samp{&} and @samp{|} operators in this way is +strongly discouraged. Instead, you should use the @samp{&&} and @samp{||} +operators that always have short-circuit behavior. Finally, the ternary operator (?:) is not supported in Octave. If short-circuiting is not important, it can be replaced by the @code{ifelse}