home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / dbcmpile.zip / COMPILE2.PRG < prev    next >
Text File  |  1986-02-16  |  1KB  |  42 lines

  1. *** compile2.prg - DBASE II version
  2. *** requires compile.dbf. this file has one field defined as charachter, 254 charachters long.
  3. *** Program will strip all comments and indentation from program files.
  4. CLEAR
  5. SET colon OFF
  6. SET talk OFF
  7. SET echo OFF
  8. SET BELL OFF
  9. USE compile
  10. COPY STRUCTURE TO temp
  11. USE temp
  12. ERASE
  13. DISPLAY files LIKE *.*
  14. STORE '        ' TO progname
  15. @ 20,10 SAY 'Enter the name of the program to be Pseudo - Compiled'
  16. @ 21,10 GET progname PICTURE '!!!!!!!!'
  17. @ 21,18 SAY '.PRG'
  18. READ
  19. STORE TRIM($(progname,1,7)) + 'C.PRG' TO m:prog
  20. STORE TRIM(progname) + '.PRG' TO progname
  21. APPEND FROM &progname sdf
  22. go TOP
  23. SET ALTERNATE TO &m:prog
  24. SET ALTERNATE ON
  25. DO WHILE .NOT. EOF
  26.      STORE 1 TO cnt
  27.      DO WHILE ($(line,cnt,1) = ' ' .AND. cnt < 50) .OR. $(line,cnt,1) = CHR(9)
  28.           STORE cnt + 1 TO cnt
  29.      ENDDO WHILE ($(line,cnt,1) = ' ' .AND. cnt < 50) .OR. $(line,cnt,1) = CHR(9)
  30.      IF $(line,cnt,1) = '*' .OR. $(line,cnt,1) = ' '
  31.           DELETE
  32.      ELSE
  33.           STORE TRIM($(line,cnt,254-cnt)) TO m:line
  34.           ? m:line
  35.      ENDIF $(line,cnt,1) = '*' .OR. $(line,cnt,1) = ' '
  36.      SKIP
  37. ENDDO WHILE .NOT. EOF
  38. SET ALTERNATE OFF
  39. USE
  40. DELETE FILE temp
  41. RETURN
  42.