BBS: Inland Empire Archive Date: 06-14-92 (10:48) Number: 383 From: ZACK JONES Refer#: NONE To: MARK MARZION Recvd: NO Subj: PDS and Stub Files Part 1 Conf: (2) Quik_Bas
> Please re-post this as it never made it to my neck of the woods.
Well,
I didn't post it. I just mentioned it. I'll post my
modified version for you though.
'STUBSCAN.BAS 03-14-90 T.E.M. Scan .BAS for stub file conflicts.
'Modified by Zack Jones to name .RPT and .BAT files the
same name 'as the source file. '----------------------------
----------------------------------------
ON ERROR GOTO E.Handler
False% = 0: True% = -1
NOFLTIN& = -1 ' Init as true...can be used.
NOEDIT& = -1
NOCOM& = -1
NOLPT& = -1
SMALLERR& = -1
'
--
COLOR 15, 0: CLS
PRINT STRING$(50, 196)
PRINT STRING$(2, 196);
PRINT " STUBSCAN parses .BAS for stub file conflicts ";
PRINT STRING$(2, 196)
PRINT STRING$(50, 196)
'
DIM PROPELLER$(4)
PROPELLER$(1) = "|": PROPELLER$(2) = "/"
PROPELLER$(3) = CHR$(196): PROPELLER$(4) = "\"
IPROP% = 1: OPROP% = 1 ' Pointer to action propeller characters
'
IROW% = CSRLIN
IFILE$ = COMMAND$
IF IFILE$ = "" THEN INPUT "Enter INPUT <.BAS> path\filename: ", IFILE$
PRINT STRING$(50, 196)
IF IFILE$ = "" THEN GOTO PgmExit
IFILE$ = UCASE$(IFILE$)
Temp% = INSTR(IFILE$, ".")
zIFILE$ = LEFT$(IFILE$, (Temp% - 1)) ' Trim any filetype
IF Temp% = 0 THEN IFILE$ = IFILE$ + ".BAS"
'
-
RPTFILE$ = zIFILE$ + ".RPT"
100 CLOSE 1: OPEN IFILE$ FOR INPUT AS #1
'200 CLOSE 2: OPEN "STUBSCAN.RPT" FOR OUTPUT AS #2
CLOSE 2: OPEN RPTFILE$ FOR OUTPUT AS #2
201 PRINT #2, " "
PRINT #2, IFILE$; " BASIC source file as of ";
PRINT #2, DATE$; " at "; LEFT$(TIME$, 5); " o`clock."
PRINT #2, " "
PRINT #2, "Line --Stub-- Source statement which may conflict..."
PRINT #2, "---- -------- --------------------------------------"
'
-
WHILE NOT EOF(1)
IF NOT EOF(1) THEN LINE INPUT #1, R$
ICOUNT& = ICOUNT& + 1
R$ = LTRIM$(R$) ' Trim leading spaces
RLEN% = LEN(R$)
IF RLEN% < 2 THEN GOTO NextRecord
R$ = UCASE$(R$) ' Toupper
Temp$ = LEFT$(R$, 1)
IF Temp$ = "'" THEN GOTO NextRecord
Temp$ = LEFT$(R$, 3)
IF Temp$ = "REM'" THEN GOTO NextRecord
IPROP% = IPROP% + 1: IF IPROP% > 4 THEN IPROP% = 1
LOCATE IROW% + 1, 15: PRINT "Working "; : LOCATE , 25:
PRINT '***append to line above
PROPELLER$(IPROP%); ' Action propeller
Temp% = INSTR(R$, "FOR INPUT ") ' This one is OK
IF Temp% <> 0 THEN GOTO EndInput
Temp% = INSTR(R$, "INPUT ")
IF Temp% = 0 THEN GOTO EndInput
NOFLTIN& = False%: Conflict$ = " NOFLTIN "
GOSUB F.WriteReptLine
NOEDIT& = False%: Conflict$ = " NOEDIT "
GOSUB F.WriteReptLine
EndInput:
Temp% = INSTR(R$, "VAL(")
IF Temp% <> 0 THEN
NOFLTIN& = False%: Conflict$ = " NOFLTIN "
GOSUB F.WriteReptLine
END IF
Temp% = INSTR(R$, "READ ")
IF Temp% <> 0 THEN
NOFLTIN& = False%: Conflict$ = " NOFLTIN "
GOSUB F.WriteReptLine
END IF
'end of part 1
---
* Origin: Zack's Shack - San Antonio TX (1:387/905.1)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET