The Source Code Window                                                <Alt-1>
Using the source code window.
──────────────────────────────────────────────────────────────────────────────

This window displays the source code file for the most recently called
function or procedure that has been compiled with debug information in it.
If you are running your program, without any single steps, this window will
not be updated until the program stops in an object file (.OBJ) compiled
with debug information - in which case the source code window will be
updated.

If the program stops within a module that was compiled without any debug
information, then no source code or variables will be displayed.

┌ Cursor Row
Source Code ┐ Step ┐ │ and Column
Filename │ Timer │ │ Position
│ │ ┌─┴─┐
┌─ 1 Source (RCV\RCV.PRG) [Step:0.0305] ─────── (76, 1) ─┐
69:RETURN (NIL)
70:
71:
72:STATIC FUNCTION GetSet_Settings()
73:
74: LOCAL aSettings := SaveCurtain()
75:
76: SET(_SET_EPOCH, 1960)
77: SET(_SET_DATEFORMAT, "dd/mm/yy")
78: SET(_SET_CURSOR, SC_NONE)
79: SET(_SET_SCOREBOARD, .F.)
██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒→


The source code window contains a list of line numbers down the left hand
side of the window - these can be toggled on or off with the use of
<Alt><N>. The line numbers are always displayed upon source code window
unless, of course you turn them off, even when your scroll the source code
window left and right using the ← and → cursor keys.

Along the top of the window we have the window number ie the <Alt> window
number combination to change quickly to this window. In the case of the
source code window, you can change quickly to this window by pressing
<Alt><1>. If the source code window is not the currently selected window,
then it will become the current window when you press <Alt><1>.

Next to the window number, the name of the current source code file is
displayed. If the source code file was not found within the current
directory, but was found either from the one of the paths contained within
the 'path for source' setting or from the SET SOURCE environment variable,
the path name will be included.

Next to the source code file name is a step timer. This times the amount of
time that a piece of code can take to one from piece of code to another.

This can be as simple as a single step or the time that it takes for the
program to run from the current line to an break point.

The format of the timer is Days, hours, minutes, seconds and hundredths of
seconds - although if any of these are unused they will not be shown.

Please Note: This results of the timer cannot be taken as exact figures as
there is a small amount of speed overhead caused by using any
debugger.

On the right-hand side of the source code window, is the cursor position of
the cursor within the source code window. This will change as you move the
cursor around the source code window.

Moving the cursor around the source code window is as easy as pressing an
cursor key: ↑ takes you up the source code window; ↓ takes you down the
source code window; ← moves you left and → moves you right.

You may use <Ctrl> → to reposition the cursor at the start of the next word
on the current line, or <Ctrl> ← to re-position the cursor to the left of
the previous word on the current line.

You may mark an expression or variable on any single line by using the
<Shift> and ← or → cursor keys, or <Shift><End> to mark from the current
cursor position to the end of the line. This is useful when you want to set
a trace point or a watch point on a variable or an expression.

You may copy a piece of marked text to the command window, by selecting the
text and pressing <Shift><Alt><C>. This will inserts the marked text at the
cursor position in the command window.

You may use the <Ctrl><End> key to move the cursor to a position parallel to
the longest line within the current window view.

<Ctrl><Home> will move the cursor to the immediate beginning of the current
line.

And, of course, we must not forget the syntax highlighting of the source
code window. You may turn off these colours or you may change them to suit
your own preferences.

Please Note: Source code files that have more than 65535 lines cause
problems. Although the CA-Clipper compiler will compile a .PRG
with more lines than 65535 the .OBJ will contain line numbers
starting at 0 onwards for any line numbers greater than 65535.

The following is an example of the pop-up menu for the source code window,
which may be summoned either by clicking the right mouse button on the
window or by using <Alt-F10>.


┌────────────────────────────┐
Open F2
Resume Shift-Alt-R
│Create Note Shift-Alt-N
├────────────────────────────┤
Break Point F9
│Break Count Shift-Alt-F9
│Break Expression Ctrl-F9
Pass Point Alt-F9
├────────────────────────────┤
Function List Shift-Alt-L
├────────────────────────────┤
Text Search Shift-Alt-S
Function Search Shift-Alt-F
│Search Again Shift-Alt-A
Goto Line Alt-G
├────────────────────────────┤
Watch Alt-W
Trace Alt-T
├────────────────────────────┤
Zoom Alt-Z
└────────────────────────────┛