contents   index   previous   next



interface: SEContextParams

 

public int seGetOptions(); 

public void seSetOptions(int seOptions);

 

The SEContextParams interface is used by the interpreter to access the interpret options you have set for the created context. The interpreter will call the seGetOptions method whenever it needs to retrieve your options, and it will call seSetOptions when it needs to temporarily turn off certain options for a particular section of code. The following options can be |’ed together in any combination:

 

SE.DEFAULT

 

Default behavior

 

SE.OPT_REQUIREVAR

 

All variables must be declared using the var keyword. If this flag is not used, the normal JavaScript behavior is in effect. When you write to an undeclared variable, the variable is automatically created as a global variable. Reading from an undeclared variable always results in an error.

 

SE.OPT_DEFAULTLOCAL

 

Variables used without declaring them with the var keyword are declared automatically as global variables as described above under SE_OPT_REQUIREVAR. This flag makes them declared as local variables instead. JavaScript standard behavior is to create the variables as global variables.

 

SE.OPT_WARNBADMATH

 

If any math operation involves NaN, flag an error. Normally, JavaScript allows NaN to be used in an operation and defines specific results.

 

SE.OPT_EXTRAPARAMS

 

Wrapper functions indicate the maximum number of parameters they can take, and extras will cause an error. This flag causes all library functions to take any number of parameters, ignoring excess parameters. It is normally useful to leave out this option, as extra parameters usually signal an incorrect usage of these functions.

 

SE.OPT_TOBOOLOBJECTS

 

JavaScript states that any object converted to a Boolean results in TRUE. If this flag is on, objects are first converted to a primitive then to a boolean. For instance, without this flag the object new Boolean(False) or new Number(0) will convert to TRUE, but with the flag they become FALSE.

 

SE.OPT_DEBUGGER

 

A debugger is in use, so ignore SE.INFREQUENT_CONT for all seEval calls.

 


interface: SEErrorHandler