Example: referencing variables and setting breakpoints in C and C++ blocks

The program below is used as the basis for several examples, described after the program listing.
#pragma runopts(EXECOPS)
#include <stdlib.h>

main()
{
      >>> z/OS Debugger is given <<<
      >>> control here.    <<<
  init();
  sort();
}

short length = 40;
static long *table;

init()
{
  table = malloc(sizeof(long)*length);
⋮
}

sort ()
{                                     /* Block sort */
  int i;
  for (i = 0; i < length–1; i++) {    /* If compiled with ISD, Block %BLOCK2; */
                                      /* if compiled with DWARF, Block %BLOCK8 */
    int j;
    for (j = i+1; j < length; j++) {  /* If compiled with ISD, Block %BLOCK3; */
                                      /* if compiled with DWARF, Block %BLOCK13 */
      static int temp;
      temp = table[i];
      table[i] = table[j];
      table[j] = temp;
    }
  }
}