## Eval for VB## Power up your apps with math skills!Eval is an expression evaluator module and math parser for Visual Basic 6.0. It evaluates almost any VB6 expression. You can accept expressions from users and calculate the result with a simple call. Just one function call is required: Evaluate(Expression)Use it to add calculation capabilities to your programs. For example, Evaluate("7+2^3") returns 15. Here are 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. ' Accept input from the user. Example: "1+2+3" Formula = Textbox.Text ' Result will be 6 Result = Evaluate(Formula) ## Supported expressionsEval 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
## Try Eval now!Download a demo and see the capabilities of Eval. The demo is a compiled program that lets you type in expressions and view the results. The demo requires VB6 run-times. Eval is being used in several commercial applications, including Project Analyzer and VB Watch. ©Aivosto Oy - |