Mercurial > hg > octave-nkf
changeset 915:b632b159b4ed
[project @ 1994-11-11 00:23:27 by jwe]
author | jwe |
---|---|
date | Fri, 11 Nov 1994 00:25:51 +0000 |
parents | 6a10b90623ea |
children | 2f35156aa18b |
files | src/tc-rep-ass.cc src/tc-rep-idx.cc src/tc-rep.cc src/token.h |
diffstat | 4 files changed, 60 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tc-rep-ass.cc +++ b/src/tc-rep-ass.cc @@ -58,6 +58,9 @@ { tree_constant rhs_tmp = rhs.make_numeric (); + if (error_state) + return; + // This is easier than actually handling assignments to strings. // An assignment to a range will normally require a conversion to a // vector since it will normally destroy the equally-spaced property @@ -331,6 +334,9 @@ { tree_constant tmp_i = i_arg.make_numeric_or_magic (); + if (error_state) + return; + TC_REP::constant_type itype = tmp_i.const_type (); int nr = rows (); @@ -597,6 +603,9 @@ tree_constant tmp_i = i_arg.make_numeric_or_range_or_magic (); + if (error_state) + return; + TC_REP::constant_type itype = tmp_i.const_type (); switch (itype) @@ -983,6 +992,9 @@ { tree_constant tmp_i = i_arg.make_numeric_or_range_or_magic (); + if (error_state) + return; + TC_REP::constant_type itype = tmp_i.const_type (); switch (itype) @@ -1049,6 +1061,9 @@ { tree_constant tmp_j = j_arg.make_numeric_or_range_or_magic (); + if (error_state) + return; + TC_REP::constant_type jtype = tmp_j.const_type (); int rhs_nr = rhs.rows (); @@ -1201,6 +1216,9 @@ { tree_constant tmp_j = j_arg.make_numeric_or_range_or_magic (); + if (error_state) + return; + TC_REP::constant_type jtype = tmp_j.const_type (); int rhs_nr = rhs.rows (); @@ -1338,6 +1356,9 @@ { tree_constant tmp_j = j_arg.make_numeric_or_range_or_magic (); + if (error_state) + return; + TC_REP::constant_type jtype = tmp_j.const_type (); int rhs_nr = rhs.rows (); @@ -1481,6 +1502,9 @@ { tree_constant tmp_j = j_arg.make_numeric_or_range_or_magic (); + if (error_state) + return; + TC_REP::constant_type jtype = tmp_j.const_type (); int rhs_nr = rhs.rows ();
--- a/src/tc-rep-idx.cc +++ b/src/tc-rep-idx.cc @@ -306,6 +306,9 @@ tree_constant tmp_i = i_arg.make_numeric_or_range_or_magic (); + if (error_state) + return retval; + TC_REP::constant_type itype = tmp_i.const_type (); switch (itype) @@ -404,6 +407,9 @@ tree_constant tmp_i = i_arg.make_numeric_or_magic (); + if (error_state) + return retval; + TC_REP::constant_type itype = tmp_i.const_type (); int nr = rows (); @@ -556,6 +562,9 @@ tree_constant tmp_i = i_arg.make_numeric_or_range_or_magic (); + if (error_state) + return retval; + TC_REP::constant_type itype = tmp_i.const_type (); int nr = rows (); @@ -681,6 +690,9 @@ tree_constant tmp_j = j_arg.make_numeric_or_range_or_magic (); + if (error_state) + return retval; + TC_REP::constant_type jtype = tmp_j.const_type (); int nr = rows (); @@ -779,6 +791,9 @@ tree_constant tmp_j = j_arg.make_numeric_or_range_or_magic (); + if (error_state) + return retval; + TC_REP::constant_type jtype = tmp_j.const_type (); int nr = rows (); @@ -869,6 +884,9 @@ tree_constant tmp_j = j_arg.make_numeric_or_range_or_magic (); + if (error_state) + return retval; + TC_REP::constant_type jtype = tmp_j.const_type (); int nr = rows (); @@ -964,6 +982,9 @@ tree_constant tmp_j = j_arg.make_numeric_or_range_or_magic (); + if (error_state) + return retval; + TC_REP::constant_type jtype = tmp_j.const_type (); int nr = rows ();
--- a/src/tc-rep.cc +++ b/src/tc-rep.cc @@ -539,6 +539,10 @@ if (! is_numeric_type ()) { tree_constant tmp = make_numeric (); + + if (error_state) + return retval; + return tmp.all (); } @@ -591,6 +595,10 @@ if (! is_numeric_type ()) { tree_constant tmp = make_numeric (); + + if (error_state) + return retval; + return tmp.any (); } @@ -652,6 +660,10 @@ if (! is_numeric_type ()) { tree_constant tmp = make_numeric (); + + if (error_state) + return retval; + return tmp.is_true (); } @@ -1286,8 +1298,8 @@ { ::error ("failed to convert `%s' to a numeric type --", string); ::error ("default conversion turned off"); -// Abort! - jump_to_top_level (); + + return; } int len = strlen (string);