OPTION CONTEXT

Previous  Next

 

OPTION CONTEXT value

 


 

This will the interpreter what context it must be in for the current code to load.  This is useful if you have code that can only be loaded/run under certain conditions.  The host application must set the correct context by using mb_set_current_context.  Since this is check during parsing, we can't use any variables so the value is a 16bit integer constant.  The parser will do a bitwise and on the required context and the option context value and if one or more bits are set then the context is valid.

 

Example:

 

' Make sure we in context 1

OPTION CONTEXT 1

 

END