by TJohnston (1 Submission)
Category: Math/Dates
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (4 Votes)
VB does not provide a means to enter and evaluate a math formula as a text string. A coworker of mine pointed out that Autodesk's LISP has a function EVAL that does exactly that. You can even plug in variables. I searched the web and discovered that plugins are available for VB, but cost hundreds of dollars. Screw that! I wrote my own. Here you are, I'll give you all what I could not find anywhere...a complete functional expression evaluator that accepts as many variables as you need. It understands every math function that is supported in VB. Extract the files from the zip file and run the VB project. Feel free to copy the code and make whatever modifications you wish to suit your needs. Have fun!