Scroll v1.0 - 2/2

 BBS: Inland Empire Archive
Date: 02-24-93 (16:40)             Number: 297
From: CHRIS TRACY                  Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: Scroll v1.0 - 2/2              Conf: (2) Quik_Bas
' Heres the second part of Scroll v1.0 - note... On the first one, i put
' 1/1 as the subejct... Sorry! I thought it was less than 90 lines! ;)

Part 2 of SCROLL.BAS - continued from last message...

                Num = Num + 1
        CASE CHR$(0) + "H"                         ' Up arrow key
                ElementToStart% = ElementToStart% - 1
                IF ElementToStart% < 0 THEN
                        ElementToStart% = ElementToStart% + 1
                        GOTO Repeat:
                END IF
                GOSUB Update:
                Num = Num - 1
        CASE EndCode$                              ' The ender key!
                GOTO Ender:
        END SELECT
Repeat:
        I$ = ""      ' This resets I$, which is what the WHILE..WEND uses.
        LOOP
        GOTO Ender:  ' Something else must've happened...
Update:
        ' This is the updater for the scroller.
        ' It redisplays the current elements.
        FOR Show = 0 TO Brw% - UpR%
                LOCATE UpR% + Show, LfC%
                COLOR Fore%, Back%
                PRINT MID$(Arry$(ElementToStart% + Show), 1, Rgc% - LfC%)_
 + STRING$((Rgc% - LfC%) - LEN(MID$(Arry$(ElementToStart% + Show), 1, Rgc%_
 - LfC%)), " ")
                'Uncomment the following line an comment the above 3 if
                'you want to use Q4t's PrtScrn (much faster).
                'PrtScrn MID$(Arry$(ElementToStart% + Show), 1, Rgc% -_
 LfC%) + STRING$((Rgc% - LfC%) - LEN(MID$(Arry$(ElementToStart% + Show),_
 1, Rgc% - LfC%)), " "), UpR% + Show, LfC%, Fore% + 16 * Back%
 ' Combine the above 2 lines (yes, its a REM statement, but...)
        NEXT Show
        RETURN  ' Give control to the other part of the SUB...
Ender:
        END SUB


________O_/________________________| SNIP |______________________\_O_______
        O \                        | HERE |                      / O
  Line wrapping and message splitted accomplished by MsgSplit 2.00,
a Victor Yiu and Scott Wunsch creation.

--- T.A.G. 2.6d Standard
 * Origin: DangerBase ][ Programming Staff 412-438-4101 (1:2615/4@FIDONET.ORG)
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