| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 | 1. wxString toDouble parser #4374 Posted by: 2004-06-08 06:10:14 | I hope someone will help me with this problem:
I want to convert a wxString like "2*sin(x*5)+2" to a double (or long if thats better :-). If I just convert it, nothing happens, because it won't read letters, operators and things like that. I think I need to make a parser or something, but I have no idea how to do so.
It's for an equation grapher, if that could be useful.
Can anybody help me? :-) | 2. Re: wxString toDouble parser #4385 Posted by: upCASE 2004-06-08 15:14:01 | Hi! I guess you mean you want to read in a string, compute the expression and give the correct result. Yes, that implies parsing :) Check http://www.xs4all.nl/~jorgb/wxGoldParser.html it seems to be cool.
upCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! | 3. Re: wxString toDouble parser #4537 Posted by: 2004-06-19 04:42:37 | Hi
Thank you very much for your answer, upCASE. But I've tried the get the GOLD Parser to work, but I couldn't. Would you or somebody like to help me with some examples, how to compile it, and an example how to parse a wxString, compute the expression and get the result into a double or float.
If thats possible, I think I know how to use the GoldParser ;)
| Forum List • Thread List • Refresh • New Topic • Search • Previous • Next 1 |
|
|