Executing Code Snippets

Sometimes it is easier to execute a block of code, from within a function, written in ferite. For this you can use the eval mechanism. What this does is the same as the eval operator in ferite. It will compile and execute the script and then return the return value of the main function. For example:

    rval = ferite_script_eval( script, "Console.println('Hello World');" );
    			

You must destroy the return value using ferite_variable_destroy just as you would a function call.