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.