BBS: Inland Empire Archive Date: 02-10-93 (12:47) Number: 313 From: CORIDON HENSHAW Refer#: NONE To: ALL Recvd: NO Subj: ELBROWSE.BAS 1/5 Conf: (2) Quik_Bas
Hello All! Here's a useful appilication that uses the ISAM ELIST database that my ELIST raw datafiles to ISAM converter creates. Note that quite a bit of code was leached from this echo ;) ===Chop=== Part 1 'NAME: ELBROWSE.BAS 'REQUIRES: PDS WITH ISAM SUPPORT LOADED 'FROM: Coridon Henshaw DECLARE FUNCTION Center$ (Text$) DECLARE FUNCTION ScrollText% (Text$, StartLine%, EndLine%, CurrItem$) DECLARE FUNCTION TextInput$ (Row%, Col%, Cursor%, MaxLen%) DECLARE FUNCTION NoteParse% (Numlines%, P$()) DECLARE SUB WrapString (Text$) DECLARE FUNCTION LoadLTHString$ (Filenumber%, Offset&) DEFINT A-Z TYPE ModeratorType FirstName AS STRING * 15 Lastname AS STRING * 15 Zone AS INTEGER Net AS INTEGER Node AS INTEGER Point AS INTEGER END TYPE TYPE ElistDataType Echotag AS STRING * 20 BriefDesc AS STRING * 60 Moderator AS ModeratorType DescIndex AS LONG RangeIndex AS LONG GateIndex AS LONG Volume AS STRING * 10 LastUpdate AS STRING * 10 SysopOnly AS STRING * 1 Member AS STRING * 1 END TYPE DIM ElistData AS ElistDataType VIEW PRINT 1 TO 5 COLOR 14, 1 CLS VIEW PRINT LOCATE 25, 1 PRINT "Keys: "+CHR$(&H1B)+" "+CHR$(&H1A)+" HOME END ESC R S F ³ _ ³ "; Filepath$ = ENVIRON$("ELISTPATH") ON ERROR GOTO FileError 1 OPEN Filepath$ + "ELDESC.ITX" FOR BINARY AS #1 2 OPEN Filepath$ + "ELRANGE.ITX" FOR BINARY AS #2 3 OPEN Filepath$ + "ELGATE.ITX" FOR BINARY AS #3 4 OPEN Filepath$ + "ELDATA.IDX" FOR ISAM ElistDataType "NULL" AS #4 ON ERROR GOTO 0 SETINDEX #4, "echotag" SEEKGE #4, " " RETRIEVE #4, ElistData DEF SEG = &HB800 ON TIMER(1) GOSUB UpdateTime TIMER ON DO COLOR 14, 1 LOCATE 1, 1 Gateway$ = RTRIM$(LEFT$(LoadLTHString(3, ElistData.GateIndex), 20) + _ STRING$(20 - LEN(Gatway$), " ")) Addr$ = RTRIM$(ElistData.Moderator.FirstName) + " " +_ RTRIM$(ElistData.Moderator.Lastname) + " (" + _ RTRIM$(LTRIM$(STR$(ElistData.Moderator.Zone))) + ":" + _ RTRIM$(LTRIM$(STR$(ElistData.Moderator.Net))) + "/"_ Addr$ = Addr$ + RTRIM$(LTRIM$(STR$(ElistData.Moderator.Node))) + "." +_ RTRIM$(LTRIM$(STR$(ElistData.Moderator.Point))) + ")" Addr$ = Addr$ + STRING$(49 - LEN(Addr$), " ") Dist$ = LEFT$(LoadLTHString(2, ElistData.RangeIndex), 26) + STRING$(70_ - LEN(Addr$), " ") IF RTRIM$(ElistData.Volume) = "-0-" THEN ElistData.Volume = "N/A" IF Gateway$ = "-0-" THEN Gateway$ = "None " PRINT "Echotag: "; ElistData.Echotag PRINT "Moderator: "; Addr$ PRINT "Volume: "; ElistData.Volume PRINT "Distrubution: "; Dist$ LOCATE 1, 50 PRINT "Gateways: "; Gateway$; LOCATE 2, 50 PRINT "Sysop only: "; ElistData.SysopOnly LOCATE 3, 50 PRINT "Members only: "; ElistData.Member LOCATE 4, 50 PRINT "Last update: "; ElistData.LastUpdate PRINT "Short title: "; ElistData.BriefDesc PRINT STRING$(80, 196); COLOR 7, 0 CItem$ = ElistData.Echotag SELECT CASE ScrollText(LoadLTHString$(1, ElistData.DescIndex), 6, 23,_ CItem$) CASE 0 ExitFlag = 1 CASE 1 'Next record MOVENEXT #4 RETRIEVE #4, ElistData CASE 2 'PREVIOUS record MOVEPREVIOUS #4 RETRIEVE #4, ElistData ===Chop=== Coridon Henshaw \ Sirrus Software --- GEcho 1.00 * Origin: TCS Concordia - Mail Only - Toronto, Ontario (1:250/820)
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