The Variables Window<Alt-3> Using the variables window. ──────────────────────────────────────────────────────────────────────────────
The variable window shows you the variables active at the current point in the program.
This window will allow you to see all of your variables that are currently active. By default the variable window is closed. You can summon the variable window by using any of these keys
<Alt><L> - adds/removes local variables to/from the variable window <Alt><S> - adds/removes static variables to/from the variable window <Alt><V> - adds/removes private variables to/from the variable window <Alt><P> - adds/removes public variables to/from the variable window
If the variable window is not currently opened, it will be opened the first time that you summon any variables. If you repeat the same key press, the variables will be removed from the variable window.
The following picture shows and example of the Variables window with different type of variables:
The top line of the variable window shows you the different variable groups that you have requested to be displayed and the number of each currently in scope. │ │ ┌────────┬───┴───┬───────┐ ┌─ 3 Variables (Loc:6, Sta:1, Pri:1, Pub:1) ─────────────┐ │nArea <Local, N> : 0 ↑ │aRay <Local, A> : [10] {1, 2, 3, 4, 5, 6, 7, 8, 9,█────┐ │I <Local, U> : NIL [unused] █│ ┌──│CBLOCK <Local, B> : {|X, Y| QOUT("Simply the Best!")█│ │ ┌│BDETACHED <Local, U> : NIL [unused] █│ │ ││oBrowse <Local, O> : { TBROWSE with 0 columns } █──┐ │ │ ││cHeader <Static, C> : [15] "I Love MrDebug!" █│ │ │ ││GETLIST <Public, A> : [0] {} █│ │ │ ││CDATE <Private, D> : 08/16/95 ↓│ │ │ │└←█████████████████████████████████████████████▒▒▒▒▒▒▒▒▒→┛│ │ │ ││ │ │ └─ BDETACHED has not yet been assigned to. │ │ │ │ │ └─── CBLOCK changed during the last step of the program - │ │ this is represented by the cyan highlight bar. │ │ It also happens to be a code block, which in │ │ this case has been deciphered. │ │ │ │ oBrowse is a clipper object. To view the object just ─┛ │ move the black highlight bar over it and press ◄──┛ │ which will summon the object browser │ │ aRay is an array ─┛
If you save your setup, or have auto-setup set to on - so that your settings are saved automatically when you quit MrDebug, the next time that you run MrDebug using these settings, the variable window will appear on the screen with those variable types that were toggled to on.
If there are more variables than can be displayed within this window, you may scroll up and down this window using ↑ or ↓.
You may set a trace point or a watch point on a specific variable, ie something that ignores variables of the same name in other functions or procedures, by pressing <Alt><T>, for a trace point or <Alt><W>, for a watch point on a variable within the variable window. This item will be added to the Watch/Trace/Track window and will only contain valid information when the program is within this function or procedure.
You may create a trace track point or a watch track point for the currently highlighted variable by pressing either <Shift><Alt><T> for a trace track point, or <Shift><Alt><W> for a watch track point. For further information, please refer to the see also entry.
To edit the variable and change it's contents, press ◄──┛.
If the variable is of a simple type, such as a NUMERIC, CHARACTER, DATE or LOGICAL, then a box will appear and you will be able to edit this variable. You should see such information as the variable's name, it's type and it's length.
Dates should be entered as character strings surrounded with CTOD(). Numerics may be entered as numbers. Character strings should be entered in quotes " " or ' '. Logical should be entered as .T. or .F.
Further information may be gained about a code block by pressing ◄──┛ on it from within the variable window or by inspecting it from the command window.
Viewing a code will produce something similar to the following:
A detailed explanation of the code block viewer is covered within the section entitled Inspecting code blocks, found in the tutorial.
Arrays will be displayed, showing each element from the first level of the array. If an array element contains another array, you will be shown the number of elements within the sub-array. At this point you could press ◄──┛ on this element to see a list of the elements within this sub-array.
Elements of any array can be edited by pressing the ◄──┛ key. Pressing ◄──┛ on an element that shows a sub-array will display the sub-array, pressing ◄──┛ on an individual item will that does not contain a sub- array will allow you to edit that item.
If, instead of pressing the ◄──┛ key on a sub-array item, you pressed the <SpaceBar> key, you could change the element from being a sub-array to a single item such as a logical, character, date or numeric entry.
Objects will be displayed within an object browser. A box will appear on the screen that contains various items of the object.
The box is broken up into two main parts. The left-hand side contains the object and it's class hierarchy in a user friendly easy to see, user format! The tree-like structure of the class hierarchy allows you to see which classes you object inherits from.
The first object within the class hierarchy is the object that you asked to view.
You may cursor up and down the list of objects to see the different properties that each object has.
The <Tab> key allows you to move between the object's methods, the object's instance variables and the objects. You may only edit the instance variables.
Alongside the Method names and Variable names you may see some letters - these letters have the following meaning:
E - Exported H - Hidden P - Protected R - Read Only
The following is an example of the pop-up menu for the variables window, which may be summoned either by clicking the right mouse button on the window or by using <Alt-F10>