octave-maintainers
[Top][All Lists]
Advanced

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

Re: matrix and unique index


From: John W. Eaton
Subject: Re: matrix and unique index
Date: Tue, 7 Jan 2003 22:24:26 -0600

On  7-Jan-2003, in response to a question posted to the help-octave
mailing list about how to make Octave allow a single index for a
matrix, other than the special x(:) form, Paul Kienzle
<address@hidden> wrote:

| Either:
| 
|     octave --traditional
| 
| OR
| 
|     octave
|     octave:1> do_fortran_indexing = 1;

Does anyone have a strong opinion *against* making this the default,
and changing do_fortran_indexing from a preference to a warning
option, so that you would specify

  warn_single_index = true

(or similar) if you wanted to be warned about indexing arrays with 2
or more dimensions with a single index (other than the special x(:)
style index)?  The default for this warning would also be false.  But
in any case, it would only be a warning, not something that would
cause a program to fail.

I think in most cases, people expect the Matlab-compatible behavior,
and probably all settings of do_fortran_indexing are there to enable
the feature, not set it to 0.  So we could eliminate some of those
things in Octave scripts and probably get rid of some unwind_protect
blocks in the process.

jwe



reply via email to

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