comparison src/ov-base-mat.cc @ 4846:7a3eb3cc292b

[project @ 2004-04-02 20:52:12 by jwe]
author jwe
date Fri, 02 Apr 2004 20:52:12 +0000
parents 8f669cc5a901
children 499d2ca46982
comparison
equal deleted inserted replaced
4845:a9cfb8b37759 4846:7a3eb3cc292b
84 // Allow conversion of empty matrix to some other type in 84 // Allow conversion of empty matrix to some other type in
85 // cases like 85 // cases like
86 // 86 //
87 // x = []; x(i).f = rhs 87 // x = []; x(i).f = rhs
88 88
89 octave_value tmp = octave_value::empty_conv (type, rhs); 89 if (type[1] == '.')
90 90 {
91 retval = tmp.subsasgn (type, idx, rhs); 91 octave_value tmp = octave_value::empty_conv (type, rhs);
92
93 retval = tmp.subsasgn (type, idx, rhs);
94 }
95 else
96 error ("invalid assignment expression");
92 } 97 }
93 else 98 else
94 { 99 {
95 std::string nm = type_name (); 100 std::string nm = type_name ();
96 error ("in indexed assignment of %s, last lhs index must be ()", 101 error ("in indexed assignment of %s, last lhs index must be ()",