On Nov 20, 4:49 pm, (E-Mail Removed) wrote:

> I need to evaluate simple arithmetic expressions.

>

> I wrote a quick and dirty program that allows me to enter dimensions

> off of a drawing, and based on global or local tolerances calculate an

> upper and lower limit to put in an inspection worksheet.

>

> When it asks for a dimension I would like to be able to type in

> something like: '(12.5+10)/2' or '150-3.45'

>

> What I'm looking for is a function along the lines of 'double

> evaluate_expression(char *)' that would solve simple 4-function

> arithmetic with parenthesis.

>

> (and I don't want to have to write it myself)

>

> I've had no luck googling for such a function. Does anybody have one

> or have a link to download one? Thanks.
Another piece of code that does what you want, and is more C++

oriented is provided in the following link:

http://www.codeproject.com/cpp/rpnex...nevaluator.asp
It's very clean and concise code. Hat's off to the developer.

Hans Smit