The most straightfoward example of using ChaiScript is the one from the front page. In this example we register a simple function that takes one parameter and returns a value. We then call the function from within ChaiScript and use a built in ChaiScript function to print the return value to the console.
Here are examples of using the ChaiScript scripting language itself, so you know what to expect. ChaiScript is inspired by ECMAScript and is designed to feel familiar and comfortable to programmers of C++.
The most straightfoward example of using ChaiScript is the one from the front page. In this example we register a simple function that takes one parameter and returns a value. We then call the function from within ChaiScript and use a built in ChaiScript function to print the return value to the console.
Note that this example relies on being able to find the ChaiScript Stdlib module, precompiled in a known location.
Here are examples of using the ChaiScript scripting language itself, so you know what to expect. ChaiScript is inspired by ECMAScript and is designed to feel familiar and comfortable to programmers of C++.