Description

Returns an @fm delimited list of the currently executing procedures as seen in the debugger's Call Stack window.

Syntax

stack = RetStack()

Parameters

None.

Returns

After the call, stack contains the call stack, as a field mark delimited variable.

Example: Return Stack in Event Code

/* The current procedure will be at the top of the list in List<1>.
The procedure that calls it is next, in List<2>*/
 
declare function RetStack
List = RetStack()
CurrentProc = List<1>
CallingProc = List<2>

 

If this code is run from the window OIPI_PLAY, in application EXAMPLES, from the button BTN_RETSTACK, the return stack will be:

List<1> =  '''$$$EXAMPLES*CLICK*OIPI_PLAY*BTN_RETSTACK'''
List<2> =  '''RUN_EVENT'''

 

Example: Return Stack in Stored Procedure

/*  running the same code in a stored procedure called STARTPROC, called from BUTTON_1 in the window OIPI_PLAY in the EXAMPLES application, the return stack is as follows:
 
List<1> = STARTPROC
List<2> = $$$EXAMPLES*CLICK*OIPI_PLAY*BUTTON_1
List<3> = RUN_EVENT
  • No labels