|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #46645] x.(string) doesn't validate that string is valid variable name. |
Date: | Wed, 09 Dec 2015 19:38:01 +0000 |
User-agent: | Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 |
URL: <http://savannah.gnu.org/bugs/?46645> Summary: x.(string) doesn't validate that string is valid variable name. Project: GNU Octave Submitted by: rik5 Submitted on: Wed 09 Dec 2015 11:38:00 AM PST Category: Interpreter Severity: 3 - Normal Priority: 5 - Normal Item Group: Regression Status: None Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: other Operating System: Any _______________________________________________________ Details: In version 3.6.4 octave:1> str = "1a" str = 1a octave:2> x.(str) = 1 error: invalid structure field name '1a' in version 3.8.2 and all later versions octave:1> str = "1a" str = 1a octave:2> x.(str) = 1 x = scalar structure containing the fields: 1a = 1 The dynamically created field name for the struct is no longer validated that it is an appropriate variable name. This is a problem because it is then rather difficult to get the value from the structure because the parser emits an error. If the struct is saved, the file will no longer load back because load() detects that the fieldname is invalid. octave:5> x.1a parse error: syntax error >>> x.1a _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?46645> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |