Possible Duplicate:
What is a fast C or Objective-C math parser?
I have a create a function which takes a formula as a NSString. And I have to replace few things in the String and get the value after executing the formula. How can I do this…
Ex: NSString *formulaString = @”((A/B)-1)*100″;
Now I can replace A by 20, and B by 10.
But how will get calculated value that is ((20/10)-1)*100 as 100
Thanks,
Ben
You can replace the characters by this method
But to calculate dat u need to parse it using some parser.