home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
DBCMPILE.ARC
/
COMPILE2.PRG
< prev
next >
Wrap
Text File
|
1986-02-16
|
1KB
|
42 lines
*** compile2.prg - DBASE II version
*** requires compile.dbf. this file has one field defined as charachter, 254 charachters long.
*** Program will strip all comments and indentation from program files.
CLEAR
SET colon OFF
SET talk OFF
SET echo OFF
SET BELL OFF
USE compile
COPY STRUCTURE TO temp
USE temp
ERASE
DISPLAY files LIKE *.*
STORE ' ' TO progname
@ 20,10 SAY 'Enter the name of the program to be Pseudo - Compiled'
@ 21,10 GET progname PICTURE '!!!!!!!!'
@ 21,18 SAY '.PRG'
READ
STORE TRIM($(progname,1,7)) + 'C.PRG' TO m:prog
STORE TRIM(progname) + '.PRG' TO progname
APPEND FROM &progname sdf
go TOP
SET ALTERNATE TO &m:prog
SET ALTERNATE ON
DO WHILE .NOT. EOF
STORE 1 TO cnt
DO WHILE ($(line,cnt,1) = ' ' .AND. cnt < 50) .OR. $(line,cnt,1) = CHR(9)
STORE cnt + 1 TO cnt
ENDDO WHILE ($(line,cnt,1) = ' ' .AND. cnt < 50) .OR. $(line,cnt,1) = CHR(9)
IF $(line,cnt,1) = '*' .OR. $(line,cnt,1) = ' '
DELETE
ELSE
STORE TRIM($(line,cnt,254-cnt)) TO m:line
? m:line
ENDIF $(line,cnt,1) = '*' .OR. $(line,cnt,1) = ' '
SKIP
ENDDO WHILE .NOT. EOF
SET ALTERNATE OFF
USE
DELETE FILE temp
RETURN