current stable:
0.99.6
unstable:
cvs (0.99.7)
General
  Home / News
  About
  Contact
  The Team

Obtaining
  Download
  Source Tarball
  CVS Web View
  Misc. Files

Documentation
  Introduction
The Manual
  Download [html]
  Download [pdf]
  View Online
API
  Download [html]
  View Online
Resources
  Script Examples

Developer
  Introduction
Developer Guide
  Download [html]
  Download [pdf]
  View Online
Ferite C API
  Download [html]
  View Online




Open Source Approved

SourceForge Logo
KwMap.net - browse the Keyword Map of ferite.org

[previous] Raising Exceptions and Reporting Errors[up][toc]Native Modules - By Hand [next]


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.



[previous] Raising Exceptions and Reporting Errors[up][toc]Native Modules - By Hand [next]
ferite et al © 2000-2004, Chris Ross