New topic: 

Bit Fields...

<http://forums.realsoftware.com/viewtopic.php?t=30739>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       JustSomeGuy           Post subject: Bit Fields...Posted: Thu Oct 
29, 2009 2:48 pm                               
Joined: Fri May 11, 2007 11:35 am
Posts: 551              I have a byte where bit zero is one flag and bit 1 is 
another flag.
I know these are small annoying questions, but I am trying to learn the 
language well....

Code:proc setflags(bit1 as boolean, bit0 as boolean) as Boolean
dim flags as UInt8 = 0
if bit0 then flags = 1
if bit1 then flags = flags and 2
return flags
end proc


Perhaps there are bit operators I'm unaware of?     
_________________
A picture paints a thousand words.
A thought paints a thousand pictures.  
                            Top           Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to