Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

wesg

macrumors regular
Original poster
Jan 2, 2008
211
0
Toronto, ON
Has anyone had success turning strings into equations?

ie. take a stored string of 2*5+6 and output 16
 
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7)

Perhaps you can use JavaScript's eval() function.
 
Thanks for all the suggestions. I'm going to look into storing them as actual values... we'll see how it goes.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.