home bbs files messages ]

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,236 of 16,010   
   g00r00 to LEE WESTLAKE   
   Re: MPL Bitwise Operators   
   13 Jan 22 12:25:44   
   
   TID: Mystic BBS 1.12 A48   
   MSGID: 1:129/215 2f5c03c6   
   REPLY: 2:250/6 895b00bf   
   TZUTC: -0500   
    LW> Is someone able to clarify as to how bitwise operators are implemented   
    LW> in MPL?   
    LW>    
    LW> For example: the expression "a := b xor c;" currently returns "Unknown   
    LW> identifier: xor"' during compilation.   
      
   MPL is supposed to support your typical bitwise operators (keywords   
   and/or/xor/shl/shr) but clearly something is not working.   
      
   There are also three functions that allow you to check, set, and toggle bits   
   in any integer type that MPL supports which can be used for now until I figure   
   out what happened.   
      
   This is in a WHATSNEW from way back in 2011 (The number you pass is the actual   
   bit you want to check, set or toggle ie 1-32)   
      
    + New MPL function "BitCheck" accepts a bit position and checks it against   
      an integer, returning true or false if the bit is on.  So for example in   
      the Records, the third bit in UserFlags is UserDeleted:   
      
        GetThisUser   
        If BitCheck(3, UserFlags) Then WriteLn('User is marked deleted');   
      
      Note that this was implemented before actual bitwise math, which also   
      made it into this version.  Keep reading! :)   
      
    + New MPL function "BitToggle" accepts a bit position and an integer and   
      toggles the bit.   
      
        GetThisUser   
        BitToggle(3, UserFlags);  // undeletes if they are deleted or deletes if   
                                  // they are not deleted.   
      
    + New MPL function "BitSet" accepts a bit position and an integer and sets   
      the bit ON/OFF based on a boolean:   
      
        GetThisUser   
        BitSet(3, UserFlags, True);  // user is marked as deleted   
      
   ... What do you mean, QWK? It took me over an hour to read!   
   --- Mystic BBS v1.12 A48 2022/01/12 (Windows/32)   
    * Origin: Sector 7 * Mystic WHQ (1:129/215)   
   SEEN-BY: 1/123 15/0 30/0 80/1 90/1 103/705 105/81 106/201 120/340   
   SEEN-BY: 120/616 123/10 131 129/215 305 153/7715 154/10 30 40 50 700   
   SEEN-BY: 203/0 218/700 220/80 90 221/1 6 226/18 30 227/114 201 229/110   
   SEEN-BY: 229/307 310 424 426 428 452 550 664 700 240/1120 5832 249/206   
   SEEN-BY: 249/317 400 266/512 280/464 282/464 1038 292/854 301/0 1   
   SEEN-BY: 301/101 113 317/3 320/219 322/757 335/364 341/66 342/200   
   SEEN-BY: 396/45 633/280 712/848 770/1 920/1 2320/105 3634/12 5020/1042   
   SEEN-BY: 5058/104   
   PATH: 129/215 154/10 301/1 229/426   
      

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca