The Stack Window<Alt-4> Using the stack window. ──────────────────────────────────────────────────────────────────────────────
Shows the procedure or function calls made at the point in time where the program has stopped.
As programs are run and functions or procedures are called, their names are added/removed to/from the top of call stack window.
Items are added to the ────────────┐ stack each time that a │ function or procedure┌─ 4 Stack (1/5) ─────────┐ is called and removed│SHADOW 3129↑─┐ The line number helps when the function or│PLAIN_BOX 108█ │ you to track down procedure returns.│INIT 619█ ├─ where each function │DRAWSCREEN 43█│ is called from. │BIG 23█─┛ │ ↓ └─ Stack Left:4460 bytes ─┛ └────────┬──────────┛ This item shows you the amount of ┛ space available on the stack that can be used by your program.
Along the top of the window we have the window number ie <Alt> and the window number combination to change quickly to this window. In the case of the call stack window, you can change quickly to this window by pressing <Alt><4>. If the call stack window is not the currently selected window, then it will become the current window when you press <Alt><4>.
Next to the window title you will see, what appears to be a fraction. This is not a representation of our wages after the government has taken it's taxes out but an indication of which level you are currently on in the call stack and the total number of procedure/function calls made at this part of the program, respectively.
The basic call stack window contains, as well as the procedure/function name the line number that the each successive function call has been made from.
For users who are running MrDebug in text modes where the column size exceeds 80 characters, you will also see the source code .prg name appear in the call stack.
Each function or procedure in the call stack window may contain it's own set of variables (locals and privates). By using the cursor keys to cursor up and down the call stack window you can see where each function or procedure call has been made from within the source code.
Each time that you move the highlight bar within the stack window, the source code window will change to reflect the source code file that contains the original call for this procedure/function, and the variable window will change to show you the variables within the stack activation.
If the source code was not compiled with debug information, then you will not see any variables for this entry in the call stack window in the variable window or, any source code in the source code window.
The following is an example of the pop-up menu for the Stack window, which may be summoned either by clicking the right mouse button on the window or by using <Alt-F10>.