GetStatement
(Engine-Level Function)
Description: | Returns the code value, statement offset or statement text size for the specified statement. |
Returns: | Varies. See Option parameter. |
Usage: | Script or steady state. |
Function Groups: | Compilation and On-Line Modifications, State |
Related to: | GetInstance | GetState | GetStatementNum | GetStateText |
Format: | GetStatement(Location, Index[, Option]) |
Parameters: |
Location |
Required. Any expression for the code value which defines the module and state. |
Index |
Required. Any numeric expression for the statement. |
Option |
Optional Boolean. If zero (the default) a suitable code value will be returned. If set to 1, the statement offset in the source file will be returned. If set to 2, the statement text size in the source file will be returned. |
Comments: | none |
Example:
If 1 Check; [ dest = GetStatement(ActiveState(modPtr), 1); ]
This script gets the first statement in the active state of the module instance pointed to by modPtr.