ejOpenGoAhead JavaScript APIGoAhead EMF

Synopsis

Open a JavaScript interpreter session.

Prototype

#include "ej.h"

int ejOpen(sym_fd_t variables, sym_fd_t functions);

Parameters

variables Symbol table for variables
functions Symbol table for functions

Description

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.

Return Value

Handle for the JavaScript interpreter.

Example

if (ejOpen(NULL, NULL)< 0) {
    /* Cant open interpreter */
    return -1;
}

See Also

JavaScriptActive Server Pages ejClose ejEval