insightsetmode
insightsetmode |
Purpose
Sets the value to use for the Insight execution mode during a test
Synopsis
procedure insightsetmode(execmode:string)
Argument
execmode
|
The string to use for the execution mode
|
Example
insightsetmode('CALCULATE_STATS') writeln('execution mode = ',insightgetmode)
Demonstration of setting the execution mode then outputting it
Further information
1. Used to mock the execution mode who requested the scenario execution, when testing code outside of an Insight scenario.
2. Without calling this function,
insightgetmode will always return
INSIGHT_MODE_RUN when testmode is active.
3. Calling this procedure when
insight_testmode is
false will cause the model to abort with a runtime error.
Related topics