The #XECUTE compiler command causes the compiler to execute the specified line of M code. This command can be placed anywhere in the PSL code. This command aids in compile time testing and debugging of PSL methods and compiler code.
The #XECUTE command is replaced with the underlying expression at compile time if it is fully resolved (literal) at compile time. The underlying expression is then passed recursively into the PSL compiler; therefore, it can be any legal PSL expression. If the underlying XECUTE expression cannot be fully resolved at compile time, it will execute at run-time (and must be a legal M expression).
Syntax
#XECUTE ASK LineOfCode
Parameters
ASK |
An indication that the compiler will display the command line and prompt for a response before executing the command. If the command times-out before you respond, of if you enter N, NO, or 0 (zero) on the command line, the XECUTE command is skipped. |
LineOfCode |
An executable line of M code. |
When Became Available
Profile v6.3
Example
#xecute ask write !,"Hello World"
// writes Hello World - after prompt