Mercurial > hg > octave-lyh
comparison src/pt-assign.cc @ 3215:bc3fdfe311a3
[project @ 1998-11-10 14:06:21 by jwe]
author | jwe |
---|---|
date | Tue, 10 Nov 1998 14:12:07 +0000 |
parents | e8a7163701be |
children | 4964d5391acc |
comparison
equal
deleted
inserted
replaced
3214:8cc04ca5b4ca | 3215:bc3fdfe311a3 |
---|---|
102 eval_error (); | 102 eval_error (); |
103 else | 103 else |
104 { | 104 { |
105 ult.assign (etype, rhs_val); | 105 ult.assign (etype, rhs_val); |
106 | 106 |
107 retval = ult.value (); | 107 if (! error_state) |
108 | |
109 if (error_state) | |
110 eval_error (); | |
111 else if (print_result ()) | |
112 { | 108 { |
113 if (Vprint_rhs_assign_val) | 109 if (etype == octave_value::asn_eq) |
114 retval.print_with_name (octave_stdout, | 110 retval = rhs_val; |
115 lhs->str_print_code ()); | |
116 else | 111 else |
112 retval = ult.value (); | |
113 | |
114 if (print_result ()) | |
117 { | 115 { |
118 // We clear any index here so that we can | 116 if (Vprint_rhs_assign_val) |
119 // get the new value of the referenced | 117 retval.print_with_name (octave_stdout, |
120 // object below, instead of the indexed | 118 lhs->str_print_code ()); |
121 // value (which should be the same as the | 119 else |
122 // right hand side value). | 120 { |
123 | 121 // We clear any index here so that we can |
124 ult.clear_index (); | 122 // get the new value of the referenced |
125 | 123 // object below, instead of the indexed |
126 octave_value lhs_val = ult.value (); | 124 // value (which should be the same as the |
127 | 125 // right hand side value). |
128 if (! error_state) | 126 |
129 lhs_val.print_with_name (octave_stdout, | 127 ult.clear_index (); |
130 lhs->name ()); | 128 |
129 octave_value lhs_val = ult.value (); | |
130 | |
131 if (! error_state) | |
132 lhs_val.print_with_name (octave_stdout, | |
133 lhs->name ()); | |
134 } | |
131 } | 135 } |
132 } | 136 } |
137 else | |
138 eval_error (); | |
133 } | 139 } |
134 } | 140 } |
135 } | 141 } |
136 else | 142 else |
137 eval_error (); | 143 eval_error (); |
233 eval_error (); | 239 eval_error (); |
234 else if (k < n) | 240 else if (k < n) |
235 { | 241 { |
236 ult.assign (etype, rhs_val(k)); | 242 ult.assign (etype, rhs_val(k)); |
237 | 243 |
238 retval(k) = ult.value (); | 244 if (! error_state) |
245 { | |
246 if (etype == octave_value::asn_eq) | |
247 retval(k) = rhs_val(k); | |
248 else | |
249 retval(k) = ult.value (); | |
250 } | |
239 } | 251 } |
240 else | 252 else |
241 error ("element number %d undefined in return list", | 253 error ("element number %d undefined in return list", |
242 k+1); | 254 k+1); |
243 | 255 |