...
Code Block | ||||
---|---|---|---|---|
| ||||
FUNCTION xpxPrintStack (firstStackLevel : INTEGER;
numberOfStackLevels : INTEGER;
outputFileName : STRING;
options : INTEGER)
status : INTEGER;
|
The xpxPrintStack function is normally used for debugging purposes. The execution stack in EDMexpressVM EDMexpressVM will be dumped (written) to the specified file and/or standard out. That is, one or both of the options XPXPRINT_LOCAL_VARIABLES and XPXPRINT_TO_STDOUT must be applied in order to obtain any output at all.
The argument <options>: A ?bitwise OR? of any of the following built in constants. (for instance XPXPRINT_GLOBAL_VARIABLES ~| XPXPRINT_ALL_STACK_LEVELS).
Please note that the bottom element of the stack is element number 1 and the top element has the number obtained from the xpfGetStackLevels function. Please as well note that the XPXPRINT_ALL_STACK_LEVELS options means that all levels from the firstStackLevel to the end is printed.
The following call will print all stack levels along with the corresponding local variables.
level = xpfGetStackLevels();
xpxPrintStack(level,level,??, XPXPRINT_LOCAL_VARIABLES~| XPXPRINT_TO_STDOUT);
See related function xpfGetStackLevels
...
Option:
...
Arguments
...
Type | Name | Comment |
INTEGER | firstStackLevel | |
INTEGER | numberOfStackLevels | |
STRING | outputFileName | The full path to the output file |
INTEGER | options | A bitwise OR of any of the following built in constants. |
Return Value
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
1 | Option | Comment |
2 | XPXPRINT_LOCAL_VARIABLES | Print all local variables for each stack level. |
3 | XPXPRINT_FUNCTIONS_ARGUMENTS | Print function/procedure arguments for each stack level. |
4 | XPXPRINT_CONSTANTS | Print constants for each stack level and global constants. |
5 | XPXPRINT_GLOBAL_VARIABLES | Print global variables. |
6 | XPXPRINT_ALL_STACK_LEVELS | Print all stack levels. |
7 | XPXPRINT_STACK_ASCENDING | Print ascending, i.e. from bottom towards top. |
8 | XPXPRINT_STACK_DESCENDING | Print descending (default). |
9 | XPXPRINT_CURRENT_STACK_LEVEL | Print current stack level. |
10 | XPXPRINT_TO_FILE | Print to file. |
Example
...
Code Block | ||
---|---|---|
| ||
The following call will print all stack levels along with the corresponding local variables. level = xpfGetStackLevels(); xpxPrintStack(level,level,??, XPXPRINT_LOCAL_VARIABLES~| XPXPRINT_TO_STDOUT); |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|