ejOpen | GoAhead JavaScript API | GoAhead EMF |
Open a JavaScript interpreter session.
#include "ej.h" int ejOpen(sym_fd_t variables, sym_fd_t functions);
variables | Symbol table for variables |
functions | Symbol table for functions |
To use JavaScript, you must first open an interpreter session with ejOpen. JavaScript interpreters usually have their own variable and global function name space. To share variable or function name space, pass a symbol table into ejOpen in the variable or function parameters. If either of these parameters are set to NULL, the symbol table will be created automatically.
Use ejClose to close the interpreter when finished.
Handle for the JavaScript interpreter.
if (ejOpen(NULL, NULL)< 0) { /* Can't open interpreter */ return -1; }