bugGNU Octave - Bugs: bug #32344, syntax difference between 3.2.3...

 
 

bug #32344: syntax difference between 3.2.3 and 3.5+ -- should be documented

Submitted by:  Pascal Dupuis <cdemills>
Submitted on:  Thu 03 Feb 2011 10:02:43 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Pascal DupuisOpen/Closed: Closed
Release: 3.2.3Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 08 Feb 2011 08:26:41 AM UTC, comment #2:

I checked in the following changeset to eliminate the confusing parse error followed by warning followed by error:

http://hg.savannah.gnu.org/hgweb/octave/rev/5252f12537f8

I also added a NEWS entry for this change.

John W. Eaton <jwe>
Project Administrator
Mon 07 Feb 2011 08:27:17 AM UTC, comment #1:

I'd be happy to have a patch that improved the documentation.

John W. Eaton <jwe>
Project Administrator
Thu 03 Feb 2011 10:02:43 PM UTC, original submission:

Consider the following code snippet, with 3 functions defined in the same file:

-under 3.2.3, 'changes(0)' produces 22 as result;
-under 3.5+, the same call results in the error:
parse error near line 21 of file changes.m
inconsistent function endings -- if one function is explicitly ended, so must all the others
warning: nested functions are coerced into subfunctions in file changes.m
error: parse error while reading function file changes.m

The comment at line 8 must be removed in order for the code to run under 3.5+, delivering 22 as result too. This stricter requirement about functions ending should be documented in the upcoming 3.4 release.

Pascal Dupuis <cdemills>
Project Member

 

(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 cdemills (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 08 Feb 2011 08:26:41 AM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1