[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warning: suggest parenthesis around assignment used as truth value
From: |
Ian McCallion |
Subject: |
Re: warning: suggest parenthesis around assignment used as truth value |
Date: |
Tue, 17 Mar 2020 11:12:32 +0000 |
On Tue, 17 Mar 2020 at 10:44, José Abílio Matos <address@hidden> wrote:
>
> I am using octave 6 and I am getting this dreadful :-):
>
> warning: suggest parenthesis around assignment used as truth value near line
> 135...
>
> The line where it complains is the one after the elseif:
>
> if length(rhs) < pow || isempty(rhs{pow})
> rhs{pow} = terms{j}(start:end);
> elseif
> rhs{pow} = [rhs{pow}, ' + ', terms{j}(start:end)];
> end
Replace elseif with else. Octave is taking "rhs{pow} =
terms{j}(start:end);" as a condition
Cheers... Ian