/Math-Interpreter-VBA

This project is a Math Interpreter, built entirely in VBA using the Shunting-Yard algorithm.

Primary LanguageVisual Basic 6.0MIT LicenseMIT

Math-Interpreter-VBA

Description

This project is a VBA Math Interpreter, made without any external dependencies.
It supports basic operations, float numbers, negative numbers, operation with brackets and unary expressions.
(This is my first interpreter on VBA yay!)

How to use

First you have to download the module, and import it on PowerPoint or Excel.
After that you should be able to use the function Evaluate to calculate an expression in a String.

' It returns the result in a string.
Eval.Evaluate(Expression)   

Documentation

Arithmetic Operators

Operator Name Priority
^ Power 3
* Multiply 2
/ Division 2
+ Sum 1
- Subtraction 1

Unary Expressions

Examples Name
++ Positive
-- Positive
+- Negative
-+ Negative
--- Negative