home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / db3debug.zip / READTHIS.PRG < prev   
Text File  |  1986-04-29  |  2KB  |  94 lines

  1.  
  2.  
  3.                        DEBUGGER.PRG
  4.  
  5. This program is quite simple to use and works on all dBASE III
  6. programs.  The DEBUGGER will list and modify each line of your
  7. program file. 
  8.  
  9.           1. All commands and text are put into uppercase.                                     
  10.  
  11.           2. All IF, ENDIF, DO WHILE, ENDDO, DO CASE, ENDCASE 
  12.              statements will be paired up and attempted to be
  13.              matched. If there is an unmatched pair, you will
  14.              be informed of the mismatched pair.
  15.  
  16.           3. You have the option of a hardcopy of the newly
  17.              debugged program. The hardcopy will have line numbers
  18.              for easier debugging.
  19.  
  20.           4. All the lines of your code will be intented for easier
  21.              debugging and just plain good programming style.
  22.                Below, are two examples of how DEBUGGER works. The
  23.                first display shows the program in it rough state.
  24.                the second, after it was run through DEBUGGER.
  25.  
  26.  
  27.  
  28. Unedited program :
  29.         
  30. clear
  31. select 1
  32. set index TO LAST
  33. do while .T.
  34. store ' ' to answer
  35. @ 10,15 say 'Type P for printer.  S for screen'
  36. @ 12,20 get answer picture '!'
  37. @ 16,15 say 'or press RETURN for previous menu.'
  38. read
  39. clear
  40. if answer=' '
  41. clear
  42. return
  43. endif 
  44. if answer ='S'
  45. go top       
  46. do rpt2       
  47. clear        
  48. else    
  49. clear      
  50. @ 10,15 say 'Please wait.  Currently printing...'
  51. do rpt1.prg         
  52. clear       
  53. endif    
  54. enddo
  55. return
  56.  
  57.                           è                           
  58.         
  59.          
  60. Revised program :
  61.  
  62. CLEAR
  63. SELECT 1
  64. SET INDEX TO LAST
  65. DO WHILE .T.
  66.    STORE ' ' TO ANSWER
  67.    @ 10,15 SAY 'TYPE P FOR PRINTER.  S FOR SCREEN'
  68.    @ 12,20 GET ANSWER PICTURE '!'
  69.    @ 16,15 SAY 'OR PRESS RETURN FOR PREVIOUS MENU.'
  70.    READ
  71.    CLEAR
  72.    IF ANSWER=' '
  73.       CLEAR
  74.       RETURN
  75.    ENDIF
  76.    IF ANSWER ='S'
  77.       GO TOP
  78.       DO RPT2
  79.       CLEAR
  80.    ELSE
  81.       CLEAR
  82.       @ 10,15 SAY 'PLEASE WAIT.  CURRENTLY PRINTING...'
  83.       DO RPT1.PRG
  84.       CLEAR
  85.    ENDIF
  86. ENDDO
  87. RETURN
  88.  
  89.  
  90.  
  91. To start DEBUGGER simply type   DO DEBUGGER   at the dBASE dot prompt.
  92.  
  93.  
  94. Enjoy!