bugGNU Octave - Bugs: bug #35645, comma at the end of an assignment...

 
 

bug #35645: comma at the end of an assignment list

Submitted by:  None
Submitted on:  Mon 27 Feb 2012 09:40:48 PM UTC  
 
Category: NoneSeverity: 1 - Wish
Priority: 1 - LaterItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Clemens BuchacherOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.6.0
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 06 Apr 2012 04:06:17 PM UTC, comment #5:

I pushed the changeset here (http://hg.savannah.gnu.org/hgweb/octave/rev/e6aa044253eb) and it will show up in the 3.8.0 release. Thanks for the easy-to-apply Mercurial changeset.

Rik <rik5>
Project Administrator
Fri 06 Apr 2012 03:59:59 PM UTC, comment #4:

Seems OK to me.

John W. Eaton <jwe>
Project Administrator
Fri 06 Apr 2012 03:21:37 PM UTC, comment #3:

I verified the patch on the development branch of Octave. I'm CC'ing jwe to see if he is okay with modifying the parser to add this behavior.

Rik <rik5>
Project Administrator
Thu 05 Apr 2012 03:06:54 AM UTC, comment #2:

The fix is fairly straightforward. I have attached a patch.

(file #25583)

Max Brister <fisheater>
Project Member
Thu 01 Mar 2012 07:07:02 PM UTC, comment #1:

Octave is mostly compatible with Matlab, but we don't chase 100% conformity. I'm keeping the bug report but lowering its priority.

In the mean time, there is the simple workaround of not using an extraneous comma. If you transfer code regularly between Matlab and Octave you are probable aware of the other restrictions such as only using single quotes or the '%' character for comments.

Rik <rik5>
Project Administrator
Mon 27 Feb 2012 09:40:48 PM UTC, original submission:

This is ok in Matlab:

[x, u,] = max([1, 2]);

but octave gives a syntax error.

To illustrate better where this is useful:

[arg,...
arg2,...
arg3,...
arg4,...
] = f();

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #25583:  bug35645.patch added by fisheater (2KiB - text/x-patch)

 

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 rik5
  • -unavailable- added by fisheater (Updated the item)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 06 Apr 2012 04:06:17 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Fri 06 Apr 2012 03:21:37 PM UTCrik5StatusNone=>Patch Submitted
      Carbon-Copy-=>Added jwe
    Thu 05 Apr 2012 03:06:54 AM UTCfisheaterAttached File-=>Added bug35645.patch, #25583
    Thu 01 Mar 2012 07:07:02 PM UTCrik5Severity3 - Normal=>1 - Wish
      Priority5 - Normal=>1 - Later

    Back to the top


    Powered by Savane 3.1-cleanup1