Re: File Date/Time

 BBS: Inland Empire Archive
Date: 03-31-93 (06:47)             Number: 350
From: DICK DENNISON                Refer#: NONE
  To: MICHAEL BAILEY                Recvd: NO  
Subj: Re: File Date/Time             Conf: (2) Quik_Bas
'>>> Start of page 3 of dt.bas

       IF regs.ax AND 255 THEN
           'PRINT "not found"
           EXIT FOR
       ELSE
           namef$ = RTRIM$(MID$(dta$, 31, 12))
           mark% = INSTR(namef$, CHR$(0))
           IF mark% > 0 THEN namef$ = LEFT$(namef$, mark% - 1)
       END IF
       array$(p%) = namef$
       PRINT namef$,
       findnext% = -1
   NEXT p%


'Setup some special key functions
   cr$ = CHR$(13)
   Nul$ = CHR$(0)
   ArrowLt$ = Nul$ + CHR$(75)
   ArrowRt$ = Nul$ + CHR$(77)
   ArrowUp$ = Nul$ + CHR$(72)
   ArrowDn$ = Nul$ + CHR$(80)
   EndKey$ = Nul$ + CHR$(79)
   Esc$ = CHR$(27)
   Home$ = Nul$ + CHR$(71)
   SpaceBar$ = CHR$(32)
'==========================================
botline% = p% \ 5 + 1
'Move cursor around
IF LEN(COMMAND$) THEN GOTO skip
LOCATE 1, 1, 1
DO                         'This section lets the user move
 In$ = INKEY$              'move the cursor around on the screen
 SELECT CASE In$
  CASE cr$
   EXIT DO
  CASE Esc$                'END
   END
  CASE Home$               'Goto the beginning of the line
   LOCATE , 1
  CASE EndKey$             'Goto the end of the line
   LOCATE , 57
  CASE ArrowUp$            'UpArrow
   x% = CSRLIN
   IF x% > 0 THEN
       xx% = xx% - 5
       LOCATE x% - 1
   END IF
  CASE ArrowDn$            'DownArrow
   x% = CSRLIN
   IF x% < botline% THEN
       xx% = xx% + 5
       LOCATE x% + 1
   END IF
  CASE ArrowLt$            'LeftArrow
   IF POS(0) > 14 THEN LOCATE , POS(0) - 14
   IF yy% > 0 THEN yy% = yy% - 1
  CASE ArrowRt$            'RightArrow
   IF POS(0) < 56 THEN LOCATE , POS(0) + 14
   IF yy% < 4 THEN yy% = yy% + 1
  CASE SpaceBar$
   BEEP
 END SELECT
 LOCATE , , 1                   'Keep cursor flashing
LOOP
'======================================================================
num% = xx% + yy%
'CLS
skip:
getdir = array$(num%)
END FUNCTION

FUNCTION GetNum% (howmany%, min%, max%)
'asc 48-57
FOR n% = 1 TO howmany%
getnumtop:
   DO
       a$ = INKEY$
   LOOP WHILE a$ = ""
   'PRINT ASC(a$)
   SELECT CASE ASC(a$)
       CASE 48 TO 57
           PRINT a$;
       CASE 13
           GetNum% = 0
           EXIT FUNCTION
       CASE ELSE
           BEEP
           a$ = ""
           GOTO getnumtop
   END SELECT
   IF VAL(a$) > max% THEN

'>>> Continued on page 4.

--- VP [DOS] V4.09e
 * Origin: The MailMan  (914)374-3903 NY Quick Share Pt #7 *HST (1:272/34)
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