Nodelist /4

 BBS: Inland Empire Archive
Date: 02-26-93 (19:04)             Number: 399
From: ROBERT CHURCH                Refer#: NONE
  To: CORIDON HENSHAW               Recvd: NO  
Subj: Nodelist /4                    Conf: (2) Quik_Bas
This is a simple list browser.  Clip NODEVIEW.BAS

'$INCLUDE: 'NODELIST.BI'

DIM N AS NodeRec
DIM I AS SMIRec
OPEN "NODELIST.SMD" FOR BINARY AS #1
OPEN "NODELIST.SMI" FOR RANDOM AS #2 LEN = LEN(I)

Rec = 1
DO
   GET #2, Rec, I
   GET #1, I.Offset + 1, N

   SystemName$ = SPACE$(ASC(N.SysLen))
   Phone$ = SPACE$(ASC(N.PhoneLen))
   Location$ = SPACE$(ASC(N.LocLen))
   Sysop$ = SPACE$(ASC(N.SysopLen))
   GET #1, , SystemName$
   GET #1, , Location$
   GET #1, , Phone$
   GET #1, , Sysop$

   CLS
   IsPnt = N.Flags AND Pnt

   PRINT "Address:  "; N.Zone; ":"; N.Net; "/"; ; N.Node;
   IF IsPnt THEN
      PRINT "."; N.Hub
   ELSE
      PRINT
      PRINT "Hub:      "; N.Hub
   END IF
   PRINT "System:    "; SystemName$
   PRINT "Sysop:     "; Sysop$
   PRINT "Phone:     "; Phone$
   PRINT "Location:  "; Location$
   PRINT "Cost:     "; N.Cost
   PRINT "BPS:      "; N.BPS * 100
   PRINT "Flags:     ";
   IF N.Flags AND CM THEN PRINT "CM,";
   IF N.Flags AND LO THEN PRINT "LO,";

   IF N.Flags AND Zone THEN PRINT "Zone,";
   IF N.Flags AND Region THEN PRINT "Region,";
   IF N.Flags AND Host THEN PRINT "Host,";
   IF N.Flags AND Hub THEN PRINT "Hub";

   DO: K$ = INKEY$: LOOP UNTIL LEN(K$)

   SELECT CASE K$
      CASE CHR$(27)
         END
      CASE CHR$(0) + CHR$(75)
         Rec = Rec - 1
         IF Rec < 1 THEN
            BEEP
            Rec = 1
         END IF
      CASE CHR$(0) + CHR$(77)
         Rec = Rec + 1
         IF Rec * 128 > LOF(1) THEN
            BEEP
            Rec = Rec - 1
         END IF
   END SELECT
LOOP UNTIL EOF(1)

--- FMail 0.90
 * Origin: -= Floating Point =- Hillsboro, Oregon (1:105/330.3)
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