octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: short-circuit ops


From: Jordi Gutiérrez Hermoso
Subject: Re: short-circuit ops
Date: Sun, 30 Sep 2012 09:11:17 -0400

On 29 September 2012 18:24, Ed Meyer <address@hidden> wrote:
> I'm taking the stanford machine learning course and in the forums there has
> been some concern about a warning we get when we run a cg optimizer supplied
> by the instructor. The messages are typically something like
>
>    possible Matlab-style short-circuit operator at line 95, column 32
>
> where the offending code is
>
>        if isnan(z2) | isinf(z2)
>
> and the warnings of course go away if I change | to ||
> However, the current matlab doc says that single boolean ops
> do not short-circuit, just like octave.

Also see this:

    http://wiki.octave.org/FAQ#Short-circuit_.26_and_.7C_operators

HTH,
- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]