Skip to content
Snippets Groups Projects
Commit ed61bfca authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

bug fixed: now p0[1,2,3] raises error

parent 77bc5da9
No related branches found
No related tags found
No related merge requests found
== BUGS ==
p1[k,0,0] should raise error
expr.cpp: get_k, get_j should allow i dependence
<= needs major modif in node.cpp
......
......@@ -274,12 +274,12 @@ void CNodeIva::tree_val( CResult& ret, const CContext& ctx ) const
// Return k-j-dependent reference (unless done above):
if ( var->typ == CVar::_J ) {
if ( ctx.i!=(uint)-1 )
if ( ref->ti )
throw "J does not require 3 indices";
ret.set_r( ctx.j );
return;
} else if ( var->typ == CVar::_Z ) {
if ( ctx.i!=(uint)-1 )
if ( ref->ti )
throw "Z does not require 3 indices";
if ( var->num>= f->nZ() )
throw "invalid reference " + var->var_info();
......@@ -377,13 +377,13 @@ void CNodeIva::tree_val( CResult& ret, const CContext& ctx ) const
if ( fc ) {
PCurve cj = fc->VC(j);
if ( var->typ == CVar::_CP ) {
if ( ctx.i!=(uint)-1 )
if ( ref->ti )
throw "P does not require 3 indices";
if ( var->num>= fc->nP )
throw "invalid p ref(" + var->var_info() + ") in curve file";
ret.set_r( cj->P[var->num] );
} else if ( var->typ == CVar::_CQ ) {
if ( ctx.i!=(uint)-1 )
if ( ref->ti )
throw "Q does not require 3 indices";
if ( var->num >= CCurve::mQuality )
throw "invalid fm ref(" + var->var_info() + ") in curve file";
......@@ -442,8 +442,7 @@ void CNodeIva::set_coord( CCoord& ret, uint k_in ) const
else if ( var->typ == CVar::_NI )
ret = CCoord("#points", "");
else
throw "reference " + var->var_info() +
" not allowed in data file";
throw "data file has no " + var->var_info();
} else if ( fc ) {
if ( var->typ == CVar::_CP ) {
if( var->num>=fc->nP )
......@@ -454,8 +453,7 @@ void CNodeIva::set_coord( CCoord& ret, uint k_in ) const
else if ( var->typ == CVar::_C )
ret = CCoord(fc->expr,"");
else
throw "reference " + var->var_info() +
" not allowed in curve file";
throw "curve file has no " + var->var_info();
} else
throw "BUG: ref->set_coord unexpected else";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment