CONTINUE FUNCTION
The continue function is provided to allow an API application to process code while a script is being executed. One use of it is to implement a debugger. A second use is to process Windows messages. This section pulls all the information about the continue function into one place.
The function is provided by the object provided to the seCreateContext API call that implements the SEContinueFunction interface. During seEval script evaluation, the function is called after each statement in the script is processed. However, the seEval call can be provided with the SE.INFREQUENT_CONT flag to call the function far less often. This flag is useful when code must be processed occassionally, but not nearly as frequently as after each statement. Because debuggers must regain control after each statement, the SEContextParams has a flag SE.OPT_DEBUGGER. This flag overrides the SE.INFREQUENT_CONT flag. This allows the API user to use the SE.INFREQUENT_CONT flag whenever it makes sense. A debugger can then optionally be used on the same code correctly, without changing that code.
Finally, when using the SE.START flag with seEval to execute code one piece at a time, control is automatically returned from the seExec API call after each script chunk. The amount of code executed in each call to seExec is determined by the presence or absence of the SE.INFREQUENT_CONT flag and the SE.OPT_DEBUGGER flag. Since control is returned to the caller after each seExec call, the continue function is not called in this case. However, you may wish to call it yourself, depending on your application.