Mercurial > octave-nkf
comparison libinterp/parse-tree/pt-idx.cc @ 16656:cf84ea2ba2d3
require dynamic field names to be character strings
* pt-idx.cc (tree_index_expression::get_struct_index):
Require field names to be character strings.
* orderfields.m: Index fieldnames with {} instead of ().
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 13 May 2013 18:50:14 -0400 |
parents | 302157614308 |
children | 8291109ac3fd |
comparison
equal
deleted
inserted
replaced
16655:8fa0b416f465 | 16656:cf84ea2ba2d3 |
---|---|
214 if (df) | 214 if (df) |
215 { | 215 { |
216 octave_value t = df->rvalue1 (); | 216 octave_value t = df->rvalue1 (); |
217 | 217 |
218 if (! error_state) | 218 if (! error_state) |
219 fn = t.string_value (); | 219 { |
220 if (t.is_string ()) | |
221 fn = t.string_value (); | |
222 else | |
223 error ("dynamic structure field names must be character strings"); | |
224 } | |
220 } | 225 } |
221 else | 226 else |
222 panic_impossible (); | 227 panic_impossible (); |
223 } | 228 } |
224 | 229 |