Board index » delphi » Eval a string and return a double ?

Eval a string and return a double ?

Quote
On Thu, 05 Jun 1997 15:38:52 +0000, Werner Selen <w...@innet.be> wrote:
>Does anybody know,

>How to evaluate a string?

>example:
>str:='(100-10)*2';        
>dVar:=EvalFunc(str);      

>EvalFunc would be the function wich calculate the string
>Has anybody found a solution for this.
>I would be very thankful for any suggestion.

This is a very common question, and someone must have answered this
before. Numerous general (Pascal) programming discuss this topic, and
there are many ready (and possibly free) component for this purpose.
So make a scan using Alta Vista, visit the Delphi Super Page, or go to
your local library/book store.

Regards,

Jani J?rvinen
Helsinki Finland

Tools, information, tips, reviews & bug lists
for professional Delphi, Win32 and WinHelp developers.

mailto:ja...@dystopia.fi
http://www.dystopia.fi/~janij/

 

Re:Eval a string and return a double ?


Does anybody know,

How to evaluate a string?

example:
str:='(100-10)*2';        
dVar:=EvalFunc(str);      

EvalFunc would be the function wich calculate the string
Has anybody found a solution for this.
I would be very thankful for any suggestion.

Please reply to w...@innet.be
Greetings,
Werner

Other Threads