home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / beehive / program / c-no-bug.arc / DRIVER.C < prev   
Encoding:
C/C++ Source or Header  |  1990-06-30  |  1.1 KB  |  49 lines

  1. /**************** driver.c ************************************/
  2. #include <stdio.h>
  3. #define  DEBUG
  4. #include "debug.h"
  5.  
  6. func2()
  7. {
  8.     int small;
  9.     long big;
  10.     TS("enter func2","--------------------------------------");
  11.     for(small = 0, big = 0l; small <5; small++){
  12.         big +=small *10;
  13.         TI("small_number:",small);
  14.         TL("big_number:",big);
  15.     }
  16.     TS("exit func2","--------------------------------------");
  17. }
  18.  
  19. func1()
  20. {
  21.     char a ='A';
  22.     int j= 123;
  23.     int *j_ptr = &j;
  24.     long k = 456789;
  25.     float f= 12.978;
  26.  
  27.     static char string[] = {"hello world"};
  28.     TS("enter func1","----------------------------------------");
  29.     TC("character test a",a);
  30.     TI("interger test",j);
  31.     TL("long test",k);
  32.     TU("unsigned test",j_ptr);
  33.     TF("float_test",f);
  34.     TD("double test",12345678.12345678);
  35.     TS("string test",string);
  36.     TS("exit func1","-------------------------------------------");
  37. }
  38.  
  39. main()
  40. {
  41.     printf("debug driver version 02 start\n");
  42.     printf("Press ^Z to start trace\n");
  43.     inkey();
  44.     func1();
  45.     func2();
  46.     printf("debug driver end\n");
  47. }
  48.  
  49.