octave-maintainers
[Top][All Lists]
Advanced

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

Re: purpose of 10486:4e64fbbd5c58


From: John W. Eaton
Subject: Re: purpose of 10486:4e64fbbd5c58
Date: Wed, 5 May 2010 14:28:07 -0400

On 30-Apr-2010, Jaroslav Hajek wrote:

| The reason is that if isindex (I) is true, I expect isindex ([1; I])
| to be also true, expect it to be usable in sub2ind etc. If there *has*
| to be an iconsistency like this, I'd prefer it to be as non-intrusive
| as possible.

OK.  Since I'm adding this (mis)feature only to allow people to run
existing Matlab code with Octave and Matlab doesn't seem to have
isindex, I don't expect this to cause trouble for them.

| I understand your motivation for this, though I still consider this to
| be the same kind of misfeature like the short-circuiting & and |
| operators. As I said, I've exhausted my arguments. The decision is up
| to you.

I checked in the following change:

  http://hg.savannah.gnu.org/hgweb/octave/rev/1834132fb50b

It's the same as the last patch I proposed, except it avoids using
feval to call Fwarning to set the warning state so overloading can't
cause trouble.

The (stupidly inconsistent, I agree) behavior is only enabled if the
Octave:allow-noninteger-ranges-as-indices warning state is set to "on"
or "off".  If Octave is started with --traditional, the default value
is "on".  Otherwise, the default is "error".

jwe


reply via email to

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