BBS: Inland Empire Archive Date: 06-11-93 (19:48) Number: 349 From: JEFFERY FOY Refer#: NONE To: ALL Recvd: NO Subj: Fido to Internet here Conf: (2) Quik_Bas
Ever wondered how to convert a Fidonet address to an Internet address? Well the following code does it quite nicely. My thanks to Joe Negron for the majority of the parsing code. Enjoy. --8<-------8<-- INPUT "Enter User's First Name: ", F$ INPUT "Enter User's Last Name: ", L$ INPUT "Enter User's Fido Address: ", S$ Colon% = INSTR(1, S$, ":") 'Get the position of the colon Slash% = INSTR(Colon%, S$, "/") 'Get the position of the slash Pnt% = INSTR(Slash%, S$, ".") 'Get the position of the point IF Pnt% = 0 THEN Pnt% = LEN(S$) END IF Zone$ = MID$(S$, 1, Colon% - 1) Net$ = MID$(S$, Colon% + 1, Slash% - Colon% - 1) Node$ = MID$(S$, Slash% + 1, Pnt% - Slash% - 1) Pnt$ = MID$(S$, Pnt% + 1) PRINT "User's Internet Address: "; PRINT F$ + "." + L$ + "@"; ' first the name IF Pnt$ = "" THEN PRINT "f" + Node$ + "."; PRINT "n" + Net$ + "."; PRINT "z" + Zone$ + ".fidonet.org" ELSE PRINT "p" + Pnt$ + "."; PRINT "f" + Node$ + "."; PRINT "n" + Net$ + "."; PRINT "z" + Zone$ + ".fidonet.org" END IF END --8<-------8<-- ... Are thunder thighs produced by eating lighting? ___ Blue Wave/QWK v2.12 $$ --- Maximus 2.01wb * Origin: In Memory Of Freddie Mercury (1:343/58.206)
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