ejOpenEngineGoAhead JavaScript APIGoAhead EMF

Synopsis

Open a JavaScript interpreter session.

Prototype

#include "ej.h"

int ejOpenEngine(sym_fd_t variables, sym_fd_t functions);

Parameters

variables Symbol table for variables.
functionsSymbol table for functions.

Description

To use JavaScript, you must first open an interpreter session with ejOpenEngine. JavaScript interpreters usually have their own variable and global function name space. To share a variable or function name space, pass a symbol table into ejOpenEngine in the variable or function parameters. If either of these parameters are set to NULL, the symbol table will be created automatically.

Use ejCloseEngine to close the interpreter when finished.

Return Value

Handle for the JavaScript interpreter.

Example

if (ejOpenEngine(NULL, NULL)< 0) {
    /* Can't open interpreter */
    return -1;
}

Stability Classification

Stable.

See Also

JavaScript, Active Server Pages ejCloseEngine ejEval