BBS: Inland Empire Archive Date: 03-20-93 (00:55) Number: 178 From: STEVE DEMO Refer#: NONE To: ALL Recvd: NO Subj: Mview Code 3 Of 5 Conf: (2) Quik_Bas
'>>> Start of page 3. OPEN File$ FOR APPEND AS 1 ' Test for file ' of IF LOF(1) < 3 THEN ' more than 1 ' char COLOR 31, 0 '| LOCATE 20, 30 '| PRINT "File NOT fouund" '+----->>+ PLAY "msL20<dBAGFED.>" '| SOUND 9000, 2 '| CLOSE 1 '| KILL File$ '<-------------------------+ ' >----+---< SLEEP 2 '| EXIT SUB '+----->> Kill that ' pesky END IF ' non-file CLOSE 1 mouseon COLOR 14, 0 LOCATE 19, 30 PRINT "Loading "; File$ 'Success OPEN "I", 1, File$ '$DYNAMIC REDIM Seeks&(1 TO 29384) ' Max number of lines ' 29384 CurSeek& = 1 '| Numlines& = 0 '| DO UNTIL EOF(1) '| LINE INPUT #1, Text$ '| Numlines& = Numlines& + 1 '/ \ IF Numlines& >= 32760 THEN ' Stretch it just a hair with COLOR 12 ' The Error routine any more and PRINT ' crash city. Allows atleast a ' 1 meg file PRINT "File to large Entire file NOT loaded" COLOR 28 PRINT "press any key to continue" PLAY "msL20<dBAGFED.>" Press$ = INPUT$(1) EXIT DO END IF LOCATE 22, 30 PRINT "Loading line:"; Numlines& Seeks&(Numlines&) = CurSeek& ' Save starting position CurSeek& = CurSeek& + LEN(Text$) + 2 ' Next position - 2 is LOOP ' for C/R & LF CurCol = 1 ' Current Column SeekEl = 1 ' Current line Escape = False COLOR 0, 7 'put final touch on screen LOCATE 4, 1 '+-------->>+ PRINT STRING$(80, " "); '| LOCATE 41, 1 '| PRINT STRING$(80, " "); '| VIEW PRINT 5 TO 40 '| mouseoff '| CLS 2 ' <----+---< mouseon DO GOSUB LoadAndDisplay GOSUB KeyProcess LOOP UNTIL Escape CLOSE 1 EXIT SUB ' were otta here LoadAndDisplay: SEEK #1, Seeks&(SeekEl) FOR I = 5 TO 40 dummy$ = INKEY$ 'clear keyboard buffer IF NOT EOF(1) THEN LINE INPUT #1, Text$ Foundone = INSTR(Text$, CHR$(11)) 'filter out ALL bad chars IF Foundone THEN '+-------->>+ MID$(Text$, Foundone) = " " '| Testit = LEN(Text$) '| MID$(Text$, Foundone) = " " '| No FOR Dotest = 1 TO Testit '| T$ = MID$(Text$, Dotest, 1) '| Runs IF T$ = CHR$(11) THEN '| MID$(Text$, Dotest) = " " '| No END IF '| NEXT Dotest '| Beeps Foundone = 0 '| END IF '| No Foundone = INSTR(Text$, CHR$(7)) '| IF Foundone THEN '| Errors Testit = LEN(Text$) '| '>>> Continued on page 4. ___ Blue Wave/QWK v2.11 --- Maximus 2.01wb * Origin: Semper Fi BBS Ft. Wayne, IN (219) 424-4292 (1:236/21)
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