Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
Reality V15.0 ()
L command (DataBasic debugger) (m618706+l.htm)
Lists source code line(s) from the currently executing DataBasic program.
L{lineNumber}
Lstart-end
Lstart,count
L*
W{lineNumber}
L
.L
lineNumber, where
lineNumber is the
number of the line.L
start-end, where
start is the starting line number and end is the ending line number.L
start,
count, where
start is the starting line number and count is the
number of lines.L*
.W
.W
lineNumber.If there are no INCLUDE or
$CHAIN statements in the listed
source, only one line number is displayed. Otherwise, the program line number is
given, followed in brackets by details of how this is derived. For example,
9 [4+3+2]
shows program line 9, which is made up of source line 4, first include line 3, second
(nested) include line 2. See the example below.
L6
lists line 6 of the program, which is in fact line 2 of the first included item:
6 [4+2] INCTEST.2 = 4
However, entering
L[6]
lists source line 6; that is:
15 [6] SRC6 = BILL
L[4+2]
lists program line 6 as above, and
L[4+3+2]
lists line 2 of the item included at line 3 of the item that was itself included at line 4 of the source item; that is program line 9:
9 [4+3+2] INCTEST2.2 = 8
L[4]+5
lists program line 9:
9 [4+3+2] INCTEST2.2 = 8
whereas entering
L[4+5]
lists program line 14 (the fifth line of the item included at source line 4):
14 [4+5] * End of INCTEST - 4
L[4]+5-[4+5]
lists program lines 9 to 13:
9 [4+3+2] INCTEST2.2 = 8
10 [4+3+3] INCTEST2.3 = 10
11 [4+3+4] * End of INCTEST2 - 4
12 [4+4] INCTEST.3 = 5
13 [4+5] * End of INCTEST - 4
The next line to be executed is marked with a chevron (>); see example below.
:DEBUG TEST INCL D INCL 1 *L* 1 [1] > * Start of SRC - 1 2 [2] SRC2 = 2 3 [3] SRC3 = 3 4 [4] INCLUDE INCTEST 5 [4+1] * Start of INCTEST - 1 6 [4+2] INCTEST.2 = 4 7 [4+3] INCLUDE INCTEST2 8 [4+3+1] * Start of INCTEST2 - 1 9 [4+3+2] INCTEST2.2 = 8 10 [4+3+3] INCTEST2.3 = 10 11 [4+3+4] * End of INCTEST2 - 4 12 [4+4] INCTEST.3 = 5 13 [4+5] * End of INCTEST - 4 14 [5] SRC5 = 5 15 [6] SRC6 = BILL 16 [7] SRC7 = 7 17 [8] * END OF SRC - 8 18 [9] End of source code. *
This example uses the L*
command to list the program
INCL from the file TEST. Line 4 of this program includes the item INCTEST, which
itself includes the item INCTEST2 at line 3 (the included lines are shown
highlighted above).
The next line to be executed is line 1 (marked with a chevron).
The line numbers in brackets in lines 5 to 13 of the listing show that the lines have been included. For example, line 5 is given as [4+1]; that is, line 1 of the item included at line 4 of the source item. Similarly, line 9 is given as [4+3+2]; that is, line 2 of the item included at line 3 of the item that was itself included at line 4 of the source item.