BBS: Inland Empire Archive Date: 10-16-92 (20:58) Number: 343 From: CORIDON HENSHAW Refer#: NONE To: ALL Recvd: NO Subj: Anyone read this? Conf: (2) Quik_Bas
Subj(0) = "Anyone see this message?"
Subj(1) = "I need help reading the Fidonet nodelist"
Greetings!
I'm in the prossess of writing a nodelist handler, but I'm
having some problems reading a FTSC-0002 nodelist. This is
the code that I've got:
===Cut Here===
TYPE FlagType
Mailer AS STRING * 1
CM AS STRING * 1
MO AS STRING * 1
RE AS STRING * 1
MN AS STRING * 1
Gate AS STRING * 10
Comment AS STRING * 32
END TYPE
TYPE AddrType
Zone AS INTEGER
Region AS INTEGER
Net AS INTEGER
Node AS INTEGER
END TYPE
TYPE NodeType
Address AS AddrType
Name AS STRING * 20
Location AS STRING * 16
Sysopname AS STRING * 20
MaxBPS AS STRING * 8
PhoneNumber AS STRING * 20
Flags AS FlagType
END TYPE
CONST True = -1
CONST False = 0
DIM Node AS NodeType
OPEN "C:\COMM\FD\NODELIST\NODELIST.283" FOR INPUT AS #1 LEN = 32767
CLS
DO
INPUT #1, In$
LOOP UNTIL In$ = "Zone"
StartRead = True
DO
IF StartRead = False THEN
Redo:
INPUT #1, In$
CapIn$ = UCASE$(In$)
IF In$ = "" THEN
ExitState = True
State = 0
END IF
ELSE
StartRead = False
Node.Address.Zone = VAL(In$)
Node.Address.Node = 0
Node.Address.Net = 0
GOTO Redo
State = 0
END IF
IF IncZone = True THEN
Node.Address.Zone = VAL(In$)
Node.Address.Node = 0
Node.Address.Net = 0
IncZone = False
State = 0
ELSEIF IncRegion = True THEN
IF Node.Address.Net = 0 THEN Node.Address.Net = 100
Node.Address.Region = VAL(In$)
IncRegion = False
ELSEIF IncNet = True THEN
Node.Address.Net = VAL(In$)
Node.Address.Node = 0
IncNet = False
ELSEIF IncNode = True THEN
Node.Address.Node = VAL(Old$)
IncNode = False
END IF
State = State + 1
IF State = 1 AND Node.Address.Zone + 1 > 0 THEN
LOCATE 1, 1
PRINT " Address: "; RTRIM$(LTRIM$(STR$(Node.Address.Zone
+_ 1))); ":"; RTRIM$(LTRIM$(STR$(Node.Address.Net))); "/";_
RTRIM$(LTRIM$(STR$(Node.Address.Node)))
PRINT " System Name: "; Node.Name
PRINT " Location: "; Node.Location
PRINT " Sysop Name: "; Node.Sysopname
PRINT "Phone Number: "; Node.PhoneNumber; ""
PRINT " BPS: "; Node.MaxBPS
PRINT USING " Flags: \
\";_ Flags$
Flags$ = ""
'SLEEP
END IF
SELECT CASE State
CASE 1, 11, 14, 26
SELECT CASE CapIn$
CASE "ZONE"
IncZone = True
CASE "REGION"
IncRegion = True
CASE "HOST"
IncNet = True
END SELECT
CASE 2
IncNode = True
CASE 3
Node.Name = In$
CASE 4
Node.Location = In$
CASE 5
Node.Sysopname = In$
CASE 6
Node.PhoneNumber = In$
CASE 7
Node.MaxBPS = In$
CASE IS >= 8
Flags$ = Flags$ + In$ + " "
END SELECT
Old$ = In$
LOOP UNTIL INKEY$ <> ""
STOP
===Cut Here===
That's all folks!
The bug that I have is that, some nodes are skiped, and
there data ends up the the last nodes Flag$ stringvar.
Anyone got an ieda on what's wrong?
...Due to the banning of PostIt! in this echo, I will be posting raw OBJ files
...(Anti-theft) here. For those of you who have a sence of HUMOR, get a life.

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