# Eval for VB (discontinued)

*Expression evaluator module and math parser for Visual Basic 6.0*

## Product discontinuation notice

Eval has been discontinued. Originally released in 1998, Eval was discontinued in 2018 as part of a normal product lifecycle. We thank all our customers who have chosen Eval. If you require this product, please contact us.

Existing licenses are still valid.

## 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 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

**Compatible with VB5, VB6 and VBCE.** Eval comes as an ordinary source code module (Eval.bas) for Visual Basic 5.0 and 6.0. There is also a legacy version for VBCE 6.0. VB.NET support is not available.

**No run-time files required.** Eval doesn't require any run-time files or any specific Windows version. We all know the problems with the distribution of run-time files: missing files, wrong versions... Eval doesn't suffer from these problems. Eval is just a normal .bas module, or maybe two.

**Update in 2013 (v1.02):** Documentation update. Help file format changed from .hlp to .chm. No changes in functionality.

## Download

Download Eval 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.