save/load anonymous function loses empty string in returned cell-array

Olaf Till olaf.till at uni-jena.de
Fri Apr 4 03:45:39 CDT 2008


On Thu, Apr 03, 2008 at 02:14:55PM -0400, John W. Eaton wrote:
Content-Description: message body text
> On  3-Apr-2008, Olaf Till wrote:
> 
> | Octave version: 3.0 (on Debian stable, from a package in unstable)
> | 
> | If an anonymous function which returns a cell-array containing an
> | empty string is saved and reloaded, the entry with the empty string in
> | the cell-array to be returned is lost:
> | 
> | octave3.0:39> a = @ () {""}
> | a =
> | 
> | @() {}
> | 
> | octave3.0:40> save -binary test.dat a
> | octave3.0:41> load test.dat
> | octave3.0:42> a 
> | a =
> | 
> | @() {}(0x0)
> 
> Please try the following change.
> 
> Thanks,
> 
> jwe

With the patch, it is fixed, but:

I don't know, but with the patch the quotes around the string seem to
be stored literally, i.e. single quotes or double quotes, depending on
which were typed in. Will that not break saving in -mat format, if the
string was given with double quotes? I can not test, since saving
anonymous functions in -mat format does not work now anyway.

Regards, Olaf.


More information about the Bug-octave mailing list