in reply to Chomp a numerical expression, return the answer.

You need the string form of eval to turn arithmetic expressions into numbers.

Phil

  • Comment on Re: Chomp a numerical expression, return the answer.

Replies are listed 'Best First'.
Re^2: Chomp a numerical expression, return the answer.
by blazar (Canon) on May 18, 2006 at 15:25 UTC

    Or else just roll his own parser and evaluator. Oh, well, maybe there are ready-made ones around...

      In the case of eval, the "ready-made one" is perl.

          -Bryan