laffo16 Posted February 2, 2009 Share Posted February 2, 2009 (edited) Simple question but not sure if im missing a function here, how do i convert a string containing an equation into a resulting number. eg. (doesnt work: = 0) $var = "(5/2.8)*2" $var = Number($var) MsgBox(0, "1", $var) $var recieves the equation in text format from a seperate program. Edited February 2, 2009 by laffo16 Link to comment Share on other sites More sharing options...
laffo16 Posted February 2, 2009 Author Share Posted February 2, 2009 should of searched first t.t my bad, it appears Execute() is what i need. Link to comment Share on other sites More sharing options...
jvanegmond Posted February 2, 2009 Share Posted February 2, 2009 Execute it. $var = "(5/2.8)*2" $var = Execute($var) MsgBox(0, "1", $var) github.com/jvanegmond Link to comment Share on other sites More sharing options...
laffo16 Posted February 2, 2009 Author Share Posted February 2, 2009 ^^ i got it, thanks manadar Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now