In C usual way is to set some bit in integer variable by shifting or oring,and
than check flag integer variable by anding with particular flag value.What is
Haskell way?
Thanks. ___
Haskell-Cafe mailing list
The same as C way. You can import Data.Bits and can use the functions.
Prelude import Data.Bits
Prelude Data.Bits Data.Bits.
Data.Bits... Data.Bits.bitDefault Data.Bits.complementBit
Data.Bits.rotate Data.Bits.shift
Data.Bits.testBitDefault
Data.Bits..|.Data.Bits.bitSize
Quoth Branimir Maksimovic bm...@hotmail.com,
In C usual way is to set some bit in integer variable by shifting or oring,
and than check flag integer variable by anding with particular flag value.
What is Haskell way?
Of course you may do the very same thing, if you like. I think if
there's
On Tue, Feb 19, 2013 at 10:11 AM, Branimir Maksimovic bm...@hotmail.comwrote:
In C usual way is to set some bit in integer variable by shifting or
oring,
and than check flag integer variable by anding with particular flag value.
What is Haskell way?
You can do that, but a somewhat more
Brandon Allbery allber...@gmail.com wrote:
In C usual way is to set some bit in integer variable by shifting or
oring, and than check flag integer variable by anding with
particular flag value. What is Haskell way?
You can do that, but a somewhat more idiomatic way would be a list
(or,