[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #50831] can't load structure with non-matlab f
From: |
Olaf Till |
Subject: |
[Octave-bug-tracker] [bug #50831] can't load structure with non-matlab field identifiers from 'ascii' format file |
Date: |
Wed, 19 Apr 2017 08:50:50 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
URL:
<http://savannah.gnu.org/bugs/?50831>
Summary: can't load structure with non-matlab field
identifiers from 'ascii' format file
Project: GNU Octave
Submitted by: i7tiol
Submitted on: Wed 19 Apr 2017 12:50:49 PM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Unexpected Error
Status: None
Assigned to: None
Originator Name: Olaf Till
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
Contrary to Matlab, Octave allows any strings as field identifiers in
structures. But after saving such structures in the 'ascii' format, they can't
be reloaded, since the validity of the identifier is checked with a general
test for identifier validity.
You can check for this bug with the following test:
%!test
%! filename = "test-ascii.dat";
%! a.("a-b") = 1;
%! unwind_protect
%! save (filename, "a");
%! la = load (filename);
%! assert (a, la.a);
%! unwind_protect_cleanup
%! unlink (filename);
%! end_unwind_protect
A patch will be attached as soon as the bug number is known.
The patch avoids checking of identifier validity whenever function fields are
read from an 'ascii' format file. The above test is contained in the
changeset.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?50831>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #50831] can't load structure with non-matlab field identifiers from 'ascii' format file,
Olaf Till <=