|
That's the bitwise shift-left operator. So, 0
shifted left 1 bit is still zero, 1 shifted left 1 bit is 2. 1 shifted left 30
bits would be (hex) 40000000.
Brian
----- Original Message -----
Sent: Thursday, July 13, 2006 6:44
PM
Subject: [DUG] C code help
I have very few clues when it comes to
C++. Particularly with things like this which appear to defy
logic! Can some one convert this to Delphi for me
please.
#define
TAG_FIELD_FLAG_DATA_TYPE_TEXT_UTF8 (0 <<
1) #define
TAG_FIELD_FLAG_DATA_TYPE_BINARY
(1 << 1)
So TAG_FIELD_FLAG_DATA_TYPE is a one-bit flag
stored in the 2nd-rightmost bit of the word, and its possible values are
TEXT_UTF8 (value 0) and BINARY (value 1).
#define
APE_TAG_FLAG_CONTAINS_FOOTER
(1 << 30)
Or is it this?
const
TAG_FIELD_FLAG_DATA_TYPE_TEXT_UTF8 = 0;
TAG_FIELD_FLAG_DATA_TYPE_BINARY =
1;
APE_TAG_FLAG_CONTAINS_FOOTER = 30;
Thanks,
Ross.
|
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi