SYNTAX:
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 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: |
Description: |
XPXPRINT_LOCAL_VARIABLES |
Print all local variables for each stack level. |
XPXPRINT_FUNCTIONS_ARGUMENTS |
Print function/procedure arguments for each stack level. |
XPXPRINT_CONSTANTS |
Print constants for each stack level and global constants. |
XPXPRINT_GLOBAL_VARIABLES |
Print global variables. |
XPXPRINT_ALL_STACK_LEVELS |
Print all stack levels. |
XPXPRINT_STACK_ASCENDING |
Print ascending, i.e. from bottom towards top. |
XPXPRINT_STACK_DESCENDING |
Print descending (default). |
XPXPRINT_CURRENT_STACK_LEVEL |
Print current stack level. |
XPXPRINT_TO_FILE |
Print to file. |