Just a sample of the Echomail archive
Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.
|    MYSTIC    |    Mystic support echo    |    16,010 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 14,535 of 16,010    |
|    ATREYU to Manuel Adorni    |
|    Re: Mystic structures    |
|        |
      MSGID: 1:229/426 EF1EE482       REPLY: 4:902/27 623b3e6d       On 23 Mar 22 12:35:53, Manuel Adorni said the following to All:              MA> Anyone have an Mystic BBS structures for QBasic?              Likely not, but its easy to do Pascal to Basic. Use my two function calls:              DECLARE FUNCTION Bas$ (text$)       DECLARE FUNCTION Pas$ (text$)       FUNCTION Bas$ (text$)        IF LEN(text$) > 0 THEN        Bas$ = MID$(text$, 2, ASC(MID$(text$, 1, 1)))        END IF       END FUNCTION       FUNCTION Pas$ (text$)        IF text$ <> "" THEN        Pas$ = CHR$(LEN(text$)) + text$        ELSE        Pas$ = ""        END IF       END FUNCTION              You use these Qbasic functions when you work to-and-from Pascal strings        because the first byte is the length of the string.              So if you had this Pascal structure:              type my_structure = record        something as string[255];       end type;       var my_data = my_structure;              In Qbasic it would be:              TYPE MYSTRUCTURE        SOMETHING AS STRING * 256       END TYPE       DIM MYDATA AS MYSTRUCTURE              Then in Qbasic you would use this to retrive the value:              BasicText$ = Bas$(MYDATA.SOMETHING)              For storing a Basic string to Pascal, it would be:              MYDATA.SOMETHING = Pas$(BasicText$)              Booleans and Char Pascal-types are one byte, so STRING * 1 in Basic. A boolean       True equals CHR$(1).              When working with records, you must define the length of the structure in the        Qbasic OPEN call:              THEPOSITION = 1       OPEN "MYSTIC\COWBELL.DAT" FOR RANDOM AS #1 LEN = LEN(MYDATA)        GET #1, THEPOSITION, MYDATA       CLOSE #1              Hope this helps,              Nick              --- Renegade vY2Ka2        * Origin: Joey, do you like movies about gladiators? (1:229/426)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca