Converting a NSString into a math opertation
Converting a NSString into a math opertation
- Subject: Converting a NSString into a math opertation
- From: Rodrigo Varela Tabuyo <email@hidden>
- Date: Wed, 19 Jun 2002 23:56:02 +0200
Hi:
I have the following problem: my application has an custom view where
users type math formulas, which are being kept as NSString. There are
several objects that use this formula with different values. I am trying
to avoid calls to a method which splits the string and identifies the
right pieces of string with math operations, with just different
parameters, doing all over again each time a value from that formula is
needed. What I need to know is if there is a way of converting a NSString
directly into a math function like the following example:
NSString *myCalc=@"sqrt(9)";
//I need code to have the same output from myCalc
float = sqrt(9);
Is there something similar to what PHP can do? or any other way...
Thank you.
Rodrigo Varela Tabuyo
A Coruqa, Spain.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.