L

Lists source code line(s) from the currently executing DataBasic program.

Syntax

L{lineNumber}

Lstart-end

Lstart,count

L*

W{lineNumber}

Operation

Included Code

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.

Specifying Line Numbers

Next Line

The next line to be executed is marked with a chevron (>); see example below.

Example

: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.