Eval
关于本产品的分类与介绍仅供参考,具体以商家网站介绍为准。
产品介绍 下 载 价格与授权 更新记录 开 发 商 技术支持
中文 | English
Power up your apps with math skills!Eval is an expression evaluator library. It evaluates almost any Visual Basic expression. You can accept expressions from the users and calculate the result with a simple call.

特征综述 About Feature

声明:本产品中文介绍为慧都控件网版权所有,未经慧都公司书面许可,严禁拷贝、转载!
Eval is an expression evaluator library. It evaluates almost any Visual Basic expression. You can accept expressions from the users and calculate the result with a simple call. A few examples of what you application might do:
  • Calculate a simple mathematical formula like "1+2+3".
  • Accept any formula like "x + y^2", substitute variable values and get the result.
  • Draw curves from user-defined formulas.
  • Build your own calculator.
  • Add expressions to your own programming language or macro system.
Eval is simple to use. Here is an example.
Formula = Textbox.Text ' Accept input from the user, example: "1+2+3"
Result = Eval(Formula) ' Result will be 6

Supported expressions
Eval can handle all Visual Basic constant expressions:
  • Numbers (decimal, octal, hexa) and string literals
  • Numeric operators: all arithmetic, comparison and logical operators (+ - * / \ ^ Mod, etc.)
  • String concatenation and Like
  • The keywords Empty and Null
  • Basic single-argument functions like CInt(), Abs() or Sgn()
Eval contains an easy interface to support variables. You can also extend the module by adding more functions.

Module information
Eval comes as an ordinary source code module (Eval.bas) for Visual Basic 5.0 and 6.0. There is also a version for VBCE 6.0. It doesn't require any specific Windows version or run-time files.

VB.NET support is currently not available. Eval is written in a way that is not easily upgraded to VB.NET.

专家咨询