BBS: Inland Empire Archive Date: 01-25-93 (23:14) Number: 342 From: STAN FOY Refer#: NONE To: ROBERT LEE Recvd: NO Subj: Re: Maximus BBS and Quic Conf: (2) Quik_Bas
-=> Quoting Robert Lee to All <=- RL> TYPE/END TYPE structure for binary/random files. Does anybody out RL> there have Maximus's structure configured in a QuickBasic TYPE/END RL> TYPE method? If so, can I FReq it from you? Thanks a bunch! Have been wanting to do this for a while, so your message prompted me to sit down and get started. The following is a quickie that may get you started. ___-------------------- Cut here ----------------------------- DEFINT A-Z TYPE UserRec Name AS STRING * 36 ' 36 City AS STRING * 36 ' 72 Alias AS STRING * 21 ' 93 Phone AS STRING * 15 ' 108 LastRead AS INTEGER ' 110 TimeRemain AS INTEGER ' 112 Password AS STRING * 16 ' 128 TimesCalled AS INTEGER ' 130 Help AS STRING * 1 ' 131 Rsvd1 AS STRING * 2 ' 133 Video AS STRING * 1 ' 134 Nulls AS STRING * 1 ' 135 Bits1 AS STRING * 1 ' 136 Rsvd2 AS STRING * 2 ' 138 Bits2 AS STRING * 2 ' 140 Priv AS STRING * 1 ' 141 Rsvd3 AS STRING * 19 ' 160 StructLen AS STRING * 2 ' 161 OnLineTime AS INTEGER ' 163 DelFlag AS INTEGER ' 165 Rsvd4 AS STRING * 8 ' 173 ScrWidth AS STRING * 1 ' 174 ScrLength AS STRING * 1 ' 175 Credit AS INTEGER ' 177 Debit AS INTEGER ' 179 XPriv AS STRING * 2 ' 181 XPDate AS STRING * 4 ' 185 XMins AS STRING * 1 ' 186 XFlags AS STRING * 1 ' 187 XReserved AS STRING * 1 ' 188 LuDate AS STRING * 4 ' 192 UserKeys AS STRING * 4 ' 196 Language AS STRING * 1 ' 197 Protocol AS STRING * 4 ' 198 KUpload AS LONG ' 202 KDnload AS LONG ' 206 KDnloadTdy AS LONG ' 210 LMsgArea AS STRING * 10 ' 220 LFilArea AS STRING * 10 ' 230 Compress AS STRING * 1 ' 231 Rsvd5 AS STRING * 1 ' 233 Extra AS STRING * 4 ' 237 END TYPE DIM User AS UserRec 'Be sure to test this on a COPY of your USER.BBS file OPEN "USER.BBS" FOR RANDOM AS #1 LEN = LEN(User) MaxRec = LOF(1) / LEN(User) X = 1 GetRec: CLS GET #1, X, User PRINT "User ===============> "; User.Name; PRINT " "; PRINT "Record " + STR$(X) + " of " + STR$(MaxRec) PRINT "User City ==========> "; User.City PRINT "User Alias==========> "; User.Alias PRINT "User Phone =========> "; User.Phone PRINT "LastRead =========> "; STR$(User.LastRead) PRINT "Time Remaining =====> "; STR$(User.TimeRemain) PRINT "Password ===========> "; User.Password PRINT "Times Called =======> "; STR$(User.TimesCalled) PRINT "Help Level =========> "; ASC(User.Help) IF ASC(User.Video) = 0 THEN Video$ = "TTY" ELSEIF ASC(User.Video) = 1 THEN Video$ = "ANSI" ELSEIF ASC(User.Video) = 2 THEN Video$ = "AVATAR" END IF PRINT "Video ==============> "; Video$ PRINT "Nulls ==============> "; ASC(User.Nulls) PRINT "Bits1 ==============> "; ASC(User.Bits1) PRINT "Bits2 ==============> "; ASC(User.Bits2) PRINT "Access Level =======> "; ASC(User.Priv) PRINT "StructLen ==========> "; ASC(User.StructLen) PRINT "Time On Line =======> "; STR$(User.OnLineTime) PRINT "Delete Flag ========> "; STR$(User.DelFlag) PRINT "Screen Width =======> "; ASC(User.ScrWidth) PRINT "Screen Length ======> "; ASC(User.ScrLength) PRINT "Credit =============> "; STR$(User.Credit) PRINT "Debit ==============> "; STR$(User.Debit) PRINT "XPriv ==============> "; User.XPriv PRINT "XPDate =============> "; User.XPDate PRINT "XPMins =============> "; User.XMins; GOSUB WaitKey CLS PRINT "XFlags =============> "; User.XFlags PRINT "XReserved ==========> "; User.XReserved PRINT "LuDate =============> "; User.LuDate PRINT "UserKeys ===========> "; User.UserKeys PRINT "Language ===========> "; User.Language PRINT "Protocol ===========> "; User.Protocol PRINT "KUpload ============> "; STR$(User.KUpload) PRINT "KDnload ============> "; STR$(User.KDnload) PRINT "KDnloadTdy =========> "; STR$(User.KDnloadTdy) PRINT "Last Message Area ==> "; User.LMsgArea PRINT "Last File Area =====> "; User.LFilArea PRINT "Compress ===========> "; User.Compress Bits1% = ASC(User.Bits1) IF Bits1% AND 1 THEN HotKey$ = "Yes" ELSE HotKey$ = "No" IF Bits1% AND 2 THEN ChatAvail$ = "Yes" ELSE ChatAvail$ = "No" IF Bits1% AND 4 THEN Maxed$ = "Yes" ELSE Maxed$ = "No" IF Bits1% AND 8 THEN Nerd$ = "Yes" ELSE Nerd$ = "No" IF Bits1% AND 16 THEN InUserList$ = "Yes" ELSE InUserList$ = "No" PRINT "Hotkeys ============> "; HotKey$ PRINT "ChatAvail ==========> "; ChatAvail$ PRINT "Maxed ==============> "; Maxed$ PRINT "Nerd ===============> "; Nerd$ PRINT "InUserList =========> "; InUserList$ PRINT "" GOSUB WaitKey X = X + 1 ' Get the next record IF X > MaxRec THEN CLOSE : END GOTO GetRec CLOSE:END WaitKey: A$ = INKEY$: IF A$ = "" THEN GOTO WaitKey IF A$ = CHR$(27) THEN CLOSE : END RETURN ___-------------------- Cut here ----------------------------- Hope that gets you started, this is by no means complete. Will let you know when there is a completed version available for 'FREQ' here at 128/128. (Should be by this weekend). Stan ... A feature is a bug with seniority. ___ Blue Wave/QWK v2.12 --- Maximus 2.01wb * Origin: CPU Etc. BBS--Colorado Springs, CO (719)597-3723 (1:128/128)
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