BBS: Inland Empire Archive Date: 06-14-92 (10:49) Number: 384 From: ZACK JONES Refer#: NONE To: MARK MARZION Recvd: NO Subj: PDS and Stub Files Part 2 Conf: (2) Quik_Bas
'attach to part 1 NextRecord: WEND PRINT PRINT STRING$(50, 196) PRINT "BASIC source file lines in.....: "; ICOUNT& PRINT "Conflict report is in file.....: "; RPTFILE$ PRINT STRING$(50, 196) IF NOFLTIN& THEN PRINT "NOFLTIN can be used." IF NOEDIT& THEN PRINT "NOEDIT can be used." IF NOCOM& THEN PRINT "NOCOM can be used." IF NOLPT& THEN PRINT "NOLPT can be used." IF SMALLERR& THEN PRINT "SMALLERR can be used." PRINT STRING$(50, 196) Stub$ = "" IF NOFLTIN& THEN Stub$ = Stub$ + "+NOFLTIN" IF NOEDIT& THEN Stub$ = Stub$ + "+NOEDIT" IF NOCOM& THEN Stub$ = Stub$ + "+NOCOM" IF NOLPT& THEN Stub$ = Stub$ + "+NOLPT" IF SMALLERR& THEN Stub$ = Stub$ + "+SMALLERR" IF Stub$ = "" THEN GOTO EndStubBat ' No bat file since no stubs ' Get the bare file name to build the .OBJ filename in STUB.BAT... IFILE$ = UCASE$(IFILE$) Temp% = INSTR(IFILE$, ".") IF Temp% <> 0 THEN IFILE$ = LEFT$(IFILE$, (Temp% - 1)) ' Trim any filetype END IF TLEN% = LEN(IFILE$) Chop% = 0 FOR Temp% = 1 TO TLEN% ' Look for rightmost "\" or ":" to chop leading C$ = MID$(IFILE$, Temp%, 1) IF (C$ = "\") OR (C$ = ":") THEN Chop% = Temp% NEXT Temp% IF Chop% <> 0 THEN IFILE$ = RIGHT$(IFILE$, (TLEN% - Chop%)) '----------------------------------------------------------- Bat$ = IFILE$ + ".BAT" 'CLOSE 1: OPEN "STUB.BAT" FOR OUTPUT AS #1 CLOSE 1: OPEN Bat$ FOR OUTPUT AS #1 PRINT #1, " @Echo OFF" PRINT #1, " Rem STUB.BAT for "; IFILE$; ".OBJ screened by STUBSCAN.EXE" PRINT #1, " LINK /NOE "; IFILE$; ".OBJ"; PRINT #1, Stub$; ";" CLOSE 1 'PRINT "STUB.BAT will link stubs with "; IFILE$; ".OBJ." PRINT Bat$; " will link stubs with "; IFILE$; ".OBJ." EndStubBat: PRINT STRING$(50, 196) PRINT "NOTE:" PRINT "Review "; RPTFILE$; " report file. It may" PRINT "be possible to use additional stub files." PRINT STRING$(50, 196) ' GOTO PgmExit '------------ F.WriteReptLine: 300 PRINT #2, USING "####"; ICOUNT&; PRINT #2, Conflict$; " "; R$ 301 RETURN '------ E.Handler: IF ERL = 100 THEN PRINT IFILE$; " not found or error OPENing it. Halting." GOTO PgmExit END IF IF (ERL = 200) OR (ERL = 300) THEN PRINT "Error handling "; RPTFILE$; " output file. Halting." GOTO PgmExit END IF PRINT "Untrapped error "; ERR; " in STUBSCAN.EXE. Sorry." PgmExit: CLOSE SYSTEM '------ --- * 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