Solved

How can I "eval" in VB5?

Posted on 1998-04-01
5
309 Views
Last Modified: 2008-02-01
I am writing a mathematical analysis program that needs to do "on-the-fly" evaluation of several lines of code which the user will input (more complicated than a simple calculator).  Is there an equivalent of the Perl "eval" statement that will let me avoid recompiling the program every time the analysis formulae change or how would I do this?  (I would guess this issue might have been addressed before in one of the 3500+ archived questions.  If so, is there an Experts-Exchange search engine that will let me avoid manually parsing the entire database?)
0
Comment
Question by:tuinstra
  • 2
  • 2
5 Comments
 

Author Comment

by:tuinstra
ID: 1460190
(For clarification, I am aware of the "Eval-O-Matic" module commercially available.  To my knowledge, it does not evaluate code, simply expressions, so it won't work.)
0
 
LVL 1

Accepted Solution

by:
lbk earned 200 total points
ID: 1460191
Try www.saxsoft.com for a stripped down VBA ocx, that allows you to offer a visual basic macro language to your customers. They have a 45-day trial which I downloaded. I was impressed.
$995, no royalties

I had the same problem, so I wrote my own calculator. It's got variables, you can add your own functions per OLE, implement it per OLE. It's pretty fancy. If you want more info, write me. lbk@ionet.net Other than that, I don't know of anything that would do the trick for you. If you could give me a reference to some info about Eval-O-Matric, that would be great.
Good luck
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1460192
Videosoft (www.videosoft.com) offers VSOCX which contains an AWK control that contains an expression evaluator.
It's $149 USD and a demo is available from them.
0
 

Author Comment

by:tuinstra
ID: 1460193
Fair enough.  This is about what I figured.  Here are the URL's for a couple commercially available "eval" modules.
http://www.aivosto.com/eval.html
http://www.vbonline.com/vbonline/cafe/eom/
I think I will look first into the less elegant, but free possibility of trying to make VB call the (WinNT/95 build of the) Perl interpreter, pass it some parameters and snag the results.  In UNIX this is eminently doable -- in Windows I'm not so sure, but I intend to try.  If not, I'll probably contact you about your module.  Thanks, Max
0
 
LVL 1

Expert Comment

by:lbk
ID: 1460194
I hope you find what you're looking for. Otherwise, I'll hear from you..
Thanks 2
Lukas
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question