[DUG] C code help
Brian Wrigley
bswrigley at xtra.co.nz
Thu Jul 13 19:32:06 NZST 2006
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 -----
From: Ross Levis
To: NZ Borland Developers Group - Delphi List
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.
------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20060713/05f48726/attachment.html
More information about the Delphi
mailing list