Mercurial > octave
comparison src/pt-select.cc @ 4223:5ebaf7eee36e
[project @ 2002-12-17 23:54:34 by jwe]
author | jwe |
---|---|
date | Tue, 17 Dec 2002 23:54:34 +0000 |
parents | 23d06c9e1edd |
children | ccfdb55c8156 |
comparison
equal
deleted
inserted
replaced
4222:1363b7e9bf3a | 4223:5ebaf7eee36e |
---|---|
133 bool retval = false; | 133 bool retval = false; |
134 | 134 |
135 int t1 = val.type_id (); | 135 int t1 = val.type_id (); |
136 int t2 = test.type_id (); | 136 int t2 = test.type_id (); |
137 | 137 |
138 binary_op_fcn f | |
139 = octave_value_typeinfo::lookup_binary_op (octave_value::op_eq, t1, t2); | |
140 | |
141 // If there is no op_eq for these types, we can't compare values. | 138 // If there is no op_eq for these types, we can't compare values. |
142 | 139 |
143 if (f && val.rows () == test.rows () && val.columns () == test.columns ()) | 140 if (val.rows () == test.rows () && val.columns () == test.columns ()) |
144 { | 141 { |
145 octave_value tmp = do_binary_op (octave_value::op_eq, val, test); | 142 octave_value tmp = do_binary_op (octave_value::op_eq, val, test); |
146 | 143 |
147 if (! error_state && tmp.is_defined ()) | 144 if (! error_state && tmp.is_defined ()) |
148 retval = tmp.is_true (); | 145 retval = tmp.is_true (); |