bugGNU Octave - Bugs: bug #43813, Edge case in indexing rules does...

 
 

bug #43813: Edge case in indexing rules does not work as in Matlab

Submitted by:  jose <josombio>
Submitted on:  Sat 13 Dec 2014 03:19:12 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: JoséOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 05 Jun 2015 07:52:28 PM UTC, comment #1:

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/011a364b4d78

John W. Eaton <jwe>
Project Administrator
Sat 13 Dec 2014 03:19:12 PM UTC, original submission:

There as an edge case in indexing rules that is not handled as in Matlab. This case is not officially documented in Matlab, but unofficially here by SCFrench, an employee from The Mathworks.

According to SCFrench, the rule is (literaly):

When performing subscripted assignment, if

  • subscripted-assigning to an uninitialized variable, AND
  • the uninitialized variable is curly-brace indexed, AND
  • the index in the curly braces is empty, AND
  • the left-hand side appears inside square braces, AND
  • the right-hand side resolves to a value / returns an output

Then the uninitialized variable is assigned a scalar cell containing the value returned by the right-hand side.

The test: the following code, executed in Matlab
and in Octave 3.8.2

This produces that the following function wrapper
does not return in Octave a result when the wrapper is called with no output arguments when someFunction returns something even if no output arguments are requested. This is shown in the following code

jose <josombio>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by josombio (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 12 Sep 2015 10:33:19 PM UTCmtmillerStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Fri 05 Jun 2015 07:52:28 PM UTCjweStatusConfirmed=>Ready For Test
    Fri 05 Jun 2015 03:15:13 AM UTCmtmillerStatusNone=>Confirmed
      Release3.8.2=>dev
      Operating SystemGNU/Linux=>Any

    Back to the top


    Powered by Savane 3.1-cleanup1