Sign in to follow this  

Easy-to-use scripting language

Recommended Posts

Greetings, I am looking for an easy-to-use scripting language to learn. I've used Lua for some time, but the fact that I have to: 1) write my own wrappers to interact with C++ code, or 2) install toLua (which I couldn't do from source in VC++, and the maintainer took the binaries off the official site) turns me off. I am looking for something that saves all that hassle. Thanks in advance. [edit] I found out Boost.Python and it looks like it could satisfy my needs, but maybe you can suggest something better. [/edit]

Share this post

Link to post
Share on other sites
You may want to check out uCalc Fast Math Parser, and uCalc Language Builder. When you unzip uCalc FMP, you will find the VC++ code in the VC subdirectory. The ready-made binary files are already there (nothing to install beyond unzipping the DLLs in your project or Windows directory), and you'll see a demonstration VC++ program that uses it. Interfacing uCalc with your VC++ code is very easy. For instance, in your VC++ code, you might have the following arbitrarily defined function:

long double _stdcall MyEasyCallback(double a, long& b, byte c)
return a + b + c;

To attach it to uCalc, the "glue code" would simply be:

ucDefineFunction("MyEasyCallback(ByVal a As Double,
ByRef b As Long, ByVal c As Byte) As Double", MyEasyCallback);

That's all there is to it. Then you can use MyEasyCallback() in your uCalc expressions.

If you download uCalc Language Builder, you'll see how to easily call Windows API routines from your script.

uCalc Language Builder, and uCalc Fast Math Parser are really the same thing underneath the hood. The first one is for those who are interested in scripting. The later is a subset for those who just want a math parser. For more, see the message I posted yesterday in this forum regarding uCalc Language Builder ( ). I posted info on the math parser separately in the Math forum.

I had actually taken a look at Lua while developing uCalc Language Builder, and I believe you'll be happy with uCalc's easier approach towards interacting with VC++.

Give it a try, and let me know what you think.

Daniel Corbier

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this