在Delphi中的数学EX pression解析器? [英] mathematical expression parser in Delphi?
本文介绍了在Delphi中的数学EX pression解析器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<一个href="http://stackoverflow.com/questions/572796/best-algorithm-for-evaluating-a-mathematical-ex$p$pssion">Best算法评估的数学EX pression?
是否有一个内置的Delphi功能这将字符串转换诸如'2 * X +电源(X,2)'或任何方程浮动? StrToFloat提高因为焦炭X和权力的例外。
Is there a built-in Delphi function which would convert a string such as '2*x+power(x,2)' or any equation to float? StrToFloat raises an exception because of the char X and power.
感谢。
推荐答案
自由 JCL 包括TEvaluator,写的是一个解析器将当前的Delphi编译器的工程师。它很可能会远远超过基于Windows脚本宿主的前pression评估更加有效。
The free JCL includes TEvaluator, a parser written by one of the current Delphi compiler engineers. It will likely be far more efficient than an expression evaluator based on Windows Script Host.
这篇关于在Delphi中的数学EX pression解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文