bugGNU Octave - Bugs: bug #31491, save produces unloadable output...

 
 

bug #31491: save produces unloadable output for nested anonymous functions

Submitted by:  None
Submitted on:  Fri 29 Oct 2010 01:25:38 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Brandon BenselOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.4
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.

 

Wed 10 Nov 2010 09:10:54 AM UTC, comment #4:

I checked in the following change:

http://hg.savannah.gnu.org/hgweb/octave/rev/64e7538db12a

This seems to fix the problem for me, so I'm closing this report.

John W. Eaton <jwe>
Project Administrator
Fri 29 Oct 2010 04:36:47 PM UTC, comment #3:

This is confirmed on a recent tip (2010-10-29). The bug seems to be the parsing of the comma, which can ordinarily be a break between statements. In this case, the comma is separating arguments in a function call but it appears that the parser for printing out the function has gotten confused.

Below is a slightly simpler example to show the problem.

Rik <rik5>
Project Administrator
Fri 29 Oct 2010 02:25:07 AM UTC, comment #2:
Anonymous
Fri 29 Oct 2010 01:49:38 AM UTC, comment #1:

The bug report environment uses markup text and the multiplication symbols in your submitted example have disappeared and been replaced by bolded text.

Rik <rik5>
Project Administrator
Fri 29 Oct 2010 01:25:38 AM UTC, original submission:

> c = @(f, T, n, t) (1/T)trapz(t, f(t).exp(-j.2.pi./T.n.t))
> four = @(f, T, n, t) sum(arrayfun(@(N) c(f, T, N, linspace(0, T, 100)).exp(j2pi/TN*t), [-n:n]))
> afour = @(f, T, N, t) arrayfun(@(x) four(f, T, N, x), t)
> save fourier


The printed representation of four/afour is incorrect, for instance:

afour =

@(f, T, N, t) arrayfun (@(x) four (f, T, N, x);
, t)

This of course prohibits loading the file; the file will only load after manual correction to the entries for four/afour.

octave:1> load fourier
parse error:

syntax error

>>> @(f, T, N, t) arrayfun (@(x) four (f, T, N, x);


Attached is the file "fourier" produced by the command "save fourier".

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #21854:  fourier added by None (4KiB - application/octet-stream)

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 10 Nov 2010 09:10:54 AM UTCjweStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Fri 29 Oct 2010 04:36:47 PM UTCrik5StatusNeed Info=>Confirmed
    Fri 29 Oct 2010 01:49:38 AM UTCrik5StatusNone=>Need Info
    Fri 29 Oct 2010 01:25:38 AM UTCNoneAttached File-=>Added fourier, #21854

    Back to the top


    Powered by Savane 3.1-cleanup1