octave-maintainers
[Top][All Lists]
Advanced

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

short circuit & and | in if and while


From: Ernst Reissner
Subject: short circuit & and | in if and while
Date: Thu, 14 Sep 2017 02:15:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

Is there anyone who can explain me,

why in matlab, and thus in octave,

if(a&b) is interpreted like if(a&&b),

whereas c=a&b differs from c=a&&b

which means that

if(a&b) is not the same as c=a&b;if(c)...

Very strange.

This feature also applies to while but not to until...

Who can explain me???




reply via email to

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