Changeset 2294 in Sophya for trunk/SophyaPI/PIext


Ignore:
Timestamp:
Dec 10, 2002, 9:29:24 AM (23 years ago)
Author:
ansari
Message:

Correction - Ajout fabs ds RPNEvaluator , Reza 10/12/02

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/piacmd.cc

    r2287 r2294  
    13491349      rpnstack.top() = exp(x);
    13501350    }
     1351    else if (args[k] == "fabs") {
     1352      if ( Check_myRPNStack_(rpnstack, x, line) ) return(1);
     1353      rpnstack.top() = fabs(x);
     1354    }
    13511355    else if (args[k] == "deg2rad") {
    13521356      if ( Check_myRPNStack_(rpnstack, x, line) ) return(1);
     
    14041408    // On met un nombre sur le stack
    14051409    else {
    1406       if (ctof(args[k].c_str(),&x) < 0) {
     1410      char * esptr;
     1411      x = strtod(args[k].c_str(), &esptr);
     1412      //      if (ctof(args[k].c_str(),&x) < 0) {
     1413      if (esptr == args[k].c_str()) {
    14071414        cerr << "PIACmd::EvalRPNExpr: syntax error near " << args[k]
    14081415             << " in expression: \n" << line << endl;
Note: See TracChangeset for help on using the changeset viewer.