help-octave
[Top][All Lists]
Advanced

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

warning: suggest parenthesis around assignment used as truth value


From: G..
Subject: warning: suggest parenthesis around assignment used as truth value
Date: Mon, 14 Jul 2008 10:57:24 -0700 (PDT)

I wonder why octave gives the following warning:

--------
octave:> warning("on", "all")
octave:> if (L = (1==1)), endif
warning: suggest parenthesis around assignment used as truth value
octave:>
--------

No warning if I use a 2nd pair of parenthesis: 

--------
octave:> if ((L = (1==1))), endif
octave:> 
--------

But isn't that last pair redundant?

G
-- 
View this message in context: 
http://www.nabble.com/warning%3A-suggest-parenthesis-around-assignment-used-as-truth-value-tp18449410p18449410.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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