Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Source/error listing

&pagelevel(4)&pagelevel

The source/error listing is requested with the SOURCE option of the MODIFY-LISTING-PROPERTIES statement.

*** SOURCE - ERROR - LISTING **    BS2000 C/C++ COMPILER 04.0B02    DATE:2023-04-02 PAGE: 1
                          SOURCENAME:*BS2000(MAINPROG)              TIME=17:37:07
___________________________________________________________________________________________

   EXP  INC  FILE    SRC BLOCK
   LIN  LEV   NO     LIN  LEV
     1    0     0      1    0  #include <stdio.h> 
  1746    0     0      2    0  #include "incl1.h"                                __
  1747    1    10      1    0  class A                                             | 
  1748    1    10      2    0  {                                                   |
  1749    1    10      3    0       int i;                                         |
  1750    1    10      4    0     public:                                          | (1)
  1751    1    10      5    0       A(int x = 1) : i(x) {};                        |
  1752    1    10      6    0       void foo() { printf( "A::foo called\n" ); };   |
  1753    1    10      7    0  } a;                                              __|
  1754    0     0      3    0  #include "incl2.h"
  1755    1    11      1    0  class B : public A
  1756    1    11      2    0  {
  1757    1    11      3    0       int i;
  1758    1    11      4    0     public:
  1759    1    11      5    0       B(int x = 2) : i(x) {};
  1760    1    11      6    0       void foo() { printf( "B::foo called\n" ); };
  1761    1    11      7    0  } b;
  1762    0     0      4    0  extern "C" int jj;
  1763    0     0      5    0  extern int ii;
  1764    0     0      6    0  
  1765    0     0      7    0  int main(void)
  1766    0     0      8    0  {
  1767    0     0      9    1    char *string = "AbCdEfG";
  1768    0     0     10    1    float xx = 1.0;
  1769    0     0     11    1    int ii = 1;
  1770    0     0     12    1    int jj = 2;
  1771    0     0     13    1    A* aptr = &a;
  1772    0     0     14    1    A* bptr = &b;
  1773    0     0     15    1  
  1774    0     0     16    1    printf("%d\n", ii);
  1775    0     0     17    1    printf("%d\n", jj);
  1776    0     0     18    1    printf("%s\n", string);
  1777    0     0     19    1    printf("%f\n", xx);
  1778    0     0     20    1    a.foo();
  1779    0     0     21    1    aptr->foo();
  1780    0     0     22    1    b.foo();
  1781    0     0     23    1    bptr->foo();
  1782    0     0     24    1 
  1783    0     0     25    1    return 0;
  1784    0     0     26    1  }

___________________________________________________________________________________________

(1)

The contents of header elements, depending on what is specified in the INCLUDE-INFORMATION option of the MODIFY-LISTING-PROPERTIES statement (only the user-defined header elements in this case).

Explanation

EXP, LIN

Serial line number in the source listing, including all lines of the header elements used in the source program. The lines from the header elements are always included in the count, regardless of whether or not they are displayed in the source listing (see the INCLUDE-INFORMATION optio.

INC, LEV

Nesting level of the header elements.

FILE, NO

Number of the file (source file or header element) for which the respective contents are mapped in the source listing. This number (starting with 0 for the source file) is incremented by 1 for each #include or #line directive. At the end of each header element, the number is reset to the value of the file containing the associated #include directive. This number is relevant for the source reference for debugging with AID if header elements contain executable statements or if #line directives are interspersed with executable statements in source programs.Only the user-defined header elements, i.e. incl1.h (10) and incl2.h (11), are expanded in the example. The standard header element stdio.h and the other #include directives contained in it are assigned the numbers 1 to 9 (see also the FILETABLE section in the cross-reference listing).

SCR, LIN

Original line number in the source file or header element, taking #line directives into account.

BLOCK, LEV

Nesting level of the statement blocks.