[bug #50010] Index error message "error: a(5): out of bound 1", et al. have bracket type match

Nicholas Jankowski <[email protected]>
Newsgroups gmane.comp.gnu.octave.bugs
Message-ID <[email protected]>
Please use the bug tracker to post updates to a bug report.  The mailing list is intended as a read-only notification stream.  Info posted to this mailing list address won't appear in the tracker database where it is most useful.

Update of bug #50010 (group octave):

                  Status:         Patch Submitted => Need Info

    _______________________________________________________

Follow-up Comment #6:

it looks like the error messaging has been cleaned up a bit since this was
first reported.  running the comment #0 tests in Octave 11.0.93 now produces:


>> a{1}=3
a =
{
  [1,1] = 3
}

>> a{2}
error: a(2): out of bound 1 (dimensions are 1x1)
>> clear
>> a{2,2} = 6
a =
{
  [1,1] = [](0x0)
  [2,1] = [](0x0)
  [1,2] = [](0x0)
  [2,2] = 6
}

>> a{5,5}
error: a(5,_): out of bound 2 (dimensions are 2x2)



as a comparison, matlab 2025a produces


>> a{1} = 3
a =
  1×1 cell array
    {[3]}
>> a{2}
Index exceeds the number of array elements. Index must not exceed 1. 
>> clear
>> a{2,2} = 6
a =
  2×2 cell array
    {0×0 double}    {0×0 double}
    {0×0 double}    {[       6]}
>> a{5,5}
Index in position 1 exceeds array bounds. Index must not exceed 2. 


is the current state sufficient enough to let us close this report as fixed?


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?50010>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCaZTftgAKCRCqLAuaBUf3
TmFRAP4q3VNWsdcoHp+6gkfnMBG1Ghlr4a6umULpliNPQUxNuwEAhRJRsxYZxX26
uMe2xgKD3mD/2Oxwmea48SkX8saGQAk=
=9AbK
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.