bugGNU Octave - Bugs: bug #32083, nested functions and developers...

 
 

bug #32083: nested functions and developers sources

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Sun 09 Jan 2011 05:56:53 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Ben AbbottOpen/Closed: Closed
Release: devOperating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Sun 09 Jan 2011 07:36:41 PM UTC, comment #6:

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/21b5284fa78d

This seems to fix the problem for me and all tests pass, so I'm closing this report. If there are new problems parsing functions as a result of this change, then please open a new bug report.

John W. Eaton <jwe>
Project Administrator
Sun 09 Jan 2011 07:00:33 PM UTC, comment #5:

I'd prefer that they were coerced. But that's easy for me to say since I'm trying to run some code written for Matab and am asking someone else (you?) to do the work.

If it requires much effort, I'd say we should just turn the warning into an error.

Ben Abbott <bpabbott>
Project Member
Sun 09 Jan 2011 06:47:47 PM UTC, comment #4:

I think things will work the same in 3.0.x as 3.2.x, but note that nested functions are not supported. Previously, Octave would silently treat them as subfunctions. For example, try this with 3.0.x:

Calling this with

I see

John W. Eaton <jwe>
Project Administrator
Sun 09 Jan 2011 06:26:10 PM UTC, comment #3:

The part below ...

... seems to indicate that the nested functions would be treated as the unnested types. Which means no sharing of variables.

I don't have a 3.2.x version to run, but with 3.0.5 ...

Should the warning be replaced by an error, or has this feature been reverted by mistake?

Ben Abbott <bpabbott>
Project Member
Sun 09 Jan 2011 06:11:14 PM UTC, comment #2:

Nested functions are not yet supported. This is not a change we will make before 3.4 is released. Should we change the error message to be more explicit about this?

John W. Eaton <jwe>
Project Administrator
Sun 09 Jan 2011 05:58:22 PM UTC, comment #1:

... trying a 2nd time.

With the following nested function ...

I get an error with the nested functions are coerced into unnested
subfunctions.

Ben Abbott <bpabbott>
Project Member
Sun 09 Jan 2011 05:56:53 PM UTC, original submission:

With the following nested function ...

Ben Abbott <bpabbott>
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 bpabbott (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
    Sun 09 Jan 2011 07:36:41 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1