BBS: Inland Empire Archive Date: 02-26-93 (19:02) Number: 397 From: ROBERT CHURCH Refer#: NONE To: CORIDON HENSHAW Recvd: NO Subj: Nodelist /2 Conf: (2) Quik_Bas
>----------------------------- NODE3.BAS 'NAME: NODELIST.BAS 'FROM: Coridon Henshaw@1:250/820 and Robert Church@1:105/330.3 'DESC: Nodelist reader '$INCLUDE: 'NODELIST.BI' DECLARE FUNCTION StrTok$ (Srce$, Delim$) List$ = COMMAND$ fd = FREEFILE OPEN List$ FOR INPUT AS #fd DIM N AS NodeRec DIM I AS SMIRec 'Output file OutFd = FREEFILE Out$ = "NODELIST.SMD" OPEN Out$ FOR BINARY AS #OutFd 'Index file Idx = FREEFILE Index$ = "NODELIST.SMI" OPEN Index$ FOR RANDOM AS #Idx LEN = LEN(I) T& = TIMER Delim$ = "," Null$ = "" DO 'CLS DO LINE INPUT #fd, Buffer$ LOOP UNTIL LEN(Buffer$) OR EOF(fd) IF LEFT$(Buffer$, 1) <> ";" THEN Ctr = Ctr + 1 Word$ = StrTok$(Buffer$, Delim$) N.Flags = 0 SELECT CASE Word$ CASE "Zone" N.Zone = VAL(StrTok$(Null$, Delim$)) N.Net = 1 N.Node = 0 N.Hub = 0 N.Flags = N.Flags OR Zone CASE "Region" N.Net = VAL(StrTok$(Null$, Delim$)) N.Node = 0 N.Hub = 0 N.Flags = N.Flags OR Region CASE "Host" N.Net = VAL(StrTok$(Null$, Delim$)) N.Node = 0 N.Hub = 0 N.Flags = N.Flags OR Host CASE "Down" GOTO NextIt CASE "Hub" N.Node = VAL(StrTok$(Null$, Delim$)) N.Hub = N.Node N.Flags = N.Flags OR Hub CASE "Pvt" N.Node = VAL(StrTok$(Null$, Delim$)) N.Flags = N.Flags OR Pvt CASE "Pnt" N.Hub = VAL(StrTok$(Null$, Delim$)) N.Flags = N.Flags OR Pnt CASE ELSE N.Node = VAL(StrTok$(Null$, Delim$)) END SELECT SystemName$ = StrTok$(Null$, Delim$) Location$ = StrTok$(Null$, Delim$) Sysop$ = StrTok$(Null$, Delim$) Phone$ = StrTok$(Null$, Delim$) N.BPS = VAL(StrTok$(Null$, Delim$)) \ 100 N.SysLen = CHR$(LEN(SystemName$)) N.LocLen = CHR$(LEN(Location$)) N.SysopLen = CHR$(LEN(Sysop$)) N.PhoneLen = CHR$(LEN(Phone$)) DO S$ = StrTok$(Null$, Delim$) SELECT CASE S$ CASE "CM" N.Flags = N.Flags OR CM CASE "LO" N.Flags = N.Flags OR LO END SELECT LOOP WHILE LEN(S$) 'More NODE3.BAS next message --- FMail 0.90 * Origin: -= Floating Point =- Hillsboro, Oregon (1:105/330.3)
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