# HG changeset patch # User jwe # Date 784513551 0 # Node ID b632b159b4ed6528bcedda5f1611387ee60166a2 # Parent 6a10b90623ea4e48f8e5a6f147d32807a75f5510 [project @ 1994-11-11 00:23:27 by jwe] diff --git a/src/tc-rep-ass.cc b/src/tc-rep-ass.cc --- 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 (); diff --git a/src/tc-rep-idx.cc b/src/tc-rep-idx.cc --- 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 (); diff --git a/src/tc-rep.cc b/src/tc-rep.cc --- 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); diff --git a/src/token.h b/src/token.h --- a/src/token.h +++ b/src/token.h @@ -47,6 +47,7 @@ function_end, if_end, while_end, + unwind_protect_end, }; enum plot_tok_type