octave-maintainers
[Top][All Lists]
Advanced

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

Re: computed multiple assignment


From: Jaroslav Hajek
Subject: Re: computed multiple assignment
Date: Sat, 30 Jan 2010 21:45:15 +0100

On Sat, Jan 30, 2010 at 6:57 PM, John W. Eaton <address@hidden> wrote:
> On 30-Jan-2010, Jaroslav Hajek wrote:
>
> | I've discovered that using the computed assignment operators works in
> | [a, b] += deal (1, 2)
> |
> | but not
> | [a{1:2}] += deal (1, 2).
> |
> | It would take some effort to make the latter work, but I doubt the
> | capability is useful at all, and apparently it is not being used
> | anywhere (it seems it isn't even documented). I vote for removing it -
> | see the attached patch. Anyone objects?
>
> I have no objection to this change.

OK, I pushed it.

> If we agree that
>
>  X op= Y
>
> is always supposed to be shorthand for
>
>  X = X op Y
>

AFAIK, this holds except for one extreme corner case : if X is a
function the former will error out but the latter will do something.

regards

-- 
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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