M
mstorkamp
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.
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.