# HG changeset patch # User jwe # Date 1080939132 0 # Node ID 7a3eb3cc292b47c6f856915e0821c4c3404cae86 # Parent a9cfb8b37759ff7db2a766de1adac7b7bedc0592 [project @ 2004-04-02 20:52:12 by jwe] diff -r a9cfb8b37759 -r 7a3eb3cc292b src/ChangeLog --- a/src/ChangeLog Fri Apr 02 20:12:24 2004 +0000 +++ b/src/ChangeLog Fri Apr 02 20:52:12 2004 +0000 @@ -1,5 +1,8 @@ 2004-04-02 John W. Eaton + * ov-base-mat.cc (octave_base_matrix::subsasgn): Don't allow + expressions like x(i)(j) or x(i){j} when x is empty. + * load-save.cc (get_file_format): Error if file does not exist. (Fload): Also complain here if specific file type is specified and file does not exist. diff -r a9cfb8b37759 -r 7a3eb3cc292b src/ov-base-mat.cc --- a/src/ov-base-mat.cc Fri Apr 02 20:12:24 2004 +0000 +++ b/src/ov-base-mat.cc Fri Apr 02 20:52:12 2004 +0000 @@ -86,9 +86,14 @@ // // x = []; x(i).f = rhs - octave_value tmp = octave_value::empty_conv (type, rhs); + if (type[1] == '.') + { + octave_value tmp = octave_value::empty_conv (type, rhs); - retval = tmp.subsasgn (type, idx, rhs); + retval = tmp.subsasgn (type, idx, rhs); + } + else + error ("invalid assignment expression"); } else { diff -r a9cfb8b37759 -r 7a3eb3cc292b src/pt-decl.cc --- a/src/pt-decl.cc Fri Apr 02 20:12:24 2004 +0000 +++ b/src/pt-decl.cc Fri Apr 02 20:52:12 2004 +0000 @@ -149,7 +149,7 @@ octave_lvalue ult = id->lvalue (); - if (ult.is_defined ()) + if (ult.is_undefined ()) { tree_expression *expr = elt.expression ();