Mercurial > hg > octave-nkf
comparison src/ov-base-scalar.cc @ 8437:f00578b495e9
remove valid_as_scalar_index
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Sat, 27 Dec 2008 17:01:52 +0100 |
parents | a1dbe9d80eee |
children | 1dce30ab0e72 |
comparison
equal
deleted
inserted
replaced
8436:342f72c1df1a | 8437:f00578b495e9 |
---|---|
73 switch (type[0]) | 73 switch (type[0]) |
74 { | 74 { |
75 case '(': | 75 case '(': |
76 { | 76 { |
77 if (type.length () == 1) | 77 if (type.length () == 1) |
78 { | 78 retval = numeric_assign (type, idx, rhs); |
79 if (idx.front().valid_scalar_indices () | |
80 && rhs.is_scalar_type () | |
81 && rhs.is_numeric_type ()) | |
82 retval = rhs; | |
83 else | |
84 retval = numeric_assign (type, idx, rhs); | |
85 } | |
86 else | 79 else |
87 { | 80 { |
88 std::string nm = type_name (); | 81 std::string nm = type_name (); |
89 error ("in indexed assignment of %s, last rhs index must be ()", | 82 error ("in indexed assignment of %s, last rhs index must be ()", |
90 nm.c_str ()); | 83 nm.c_str ()); |