HELP

 BBS: Inland Empire Archive
Date: 02-01-93 (09:57)             Number: 385
From: JOHN GALLAS                  Refer#: NONE
  To: DENIS DUBUC                   Recvd: NO  
Subj: HELP                           Conf: (2) Quik_Bas
DD>I would like to know how to the Command for viewing a text file that is
DD>more then 25 line long by having a thing like press a key to continue
DD>without having the file scrolling down to the END.The only thing that I've
DD>been able to do so far is using the | MORE Command, but there must be
DD>another way to control the text, I checked the 3 Books that I have but I
DD>haven't find anything. Could someone please help me?

Try the following program:

PRINT "Enter the filename you want to view."
LINE INPUT ">"; FileName$

OPEN FileName$ FOR INPUT AS #1

DO UNTIL EOF(1)

   LINE INPUT #1, a$
   PRINT a$
   Down = Down + 1
   IF Down = 24 THEN
      Down = 1
      PRINT "More? ";
      DO
       x$ = UCASE$(INPUT$(1))
      LOOP UNTIL X$ = "Y" OR X$="N"
      IF X$ = "N" THEN EXIT DO
      LOCATE ,1
   END IF

LOOP

CLOSE #1
END

 * OLX 2.1 TD * Stack overflow: too many pancakes!

--- TMail v1.30.4
 * Origin: TC-AMS MLTBBS 2.2 - Minnetonka, MN (612)-938-4799 (1:282/7)
Outer Court
Echo Basic Postings

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