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

simplify pocket calculator

parent 2b55bc7d
No related branches found
No related tags found
No related merge requests found
...@@ -114,18 +114,18 @@ void CFrida::execute_cmd( const string cmdline ) ...@@ -114,18 +114,18 @@ void CFrida::execute_cmd( const string cmdline )
// Pocket calculator // Pocket calculator
if( T->has_dummy() ) if( T->has_dummy() )
throw S("dummy argument t not allowed outside curve definitions"); throw S("dummy argument t not allowed outside curve definitions");
NOlm::IterateO fiter( NOlm::IterTOL ); if( T->k_dependent() ) {
if( fiter.size()==0 || !T->k_dependent() ) { NOlm::IterateO fiter;
RObj ret = T->tree_point_val();
if( !CNode::eval( "defined (\"$silent\")" )->to_b() && ret->to_s() != "__nullptr__" )
cout << ret->to_s() << "\n";
} else {
while ( (fiter()) ) { while ( (fiter()) ) {
int k = fiter.k(); int k = fiter.k();
if ( fiter.size()>1 ) if ( fiter.size()>1 )
cout << "f" << k <<":"; cout << "f" << k <<":";
cout << T->tree_point_val( k )->to_s() << "\n"; cout << T->tree_point_val( k )->to_s() << "\n";
} }
} else {
RObj ret = T->tree_point_val();
if( !CNode::eval( "defined (\"$silent\")" )->to_b() && ret->to_s() != "__nullptr__" )
cout << ret->to_s() << "\n";
} }
} }
} }
......
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