Title: Message
Thank you for this detailed response and I will indeed try and locate a good resource on this subject.  I think it has been suggested before to maintain a resources page for the group.  Never seemed to happen.
 
Andrew
-----Original Message-----
From: Adam Peterson [mailto:[EMAIL PROTECTED]
Sent: 05 January 2006 16:59
To: Truckle, Andrew J
Subject: Re: [personal] [msvc] What is the next flag value I need to use?

I would second what Jason told you, but I'll expand a little bit.  They are using binary flags so each position in the binary number indicates a different flag.  A character is 1 byte or 8 bits, so had 8 values as flags as follows:
 
00000001
00000010
00000100
00001000
00010000
00100000
01000000
10000000
 
So if all 8 flags were set it would look like this:
 
11111111
 
if only 3 flags were set it might look like this:
 
00101101
 
Notice we are looking at a binary representation.  Nobody likes to do that so they normally use decimal or hex so the above 10 examples would be:
 
00000001 = dec 1 = hex 1
00000010 = dec 2 = hex 2
00000100 = dec 4 = hex 4
00001000 = dec 8 = hex 8
00010000 = dec 16 = hex 10
00100000 = dec 32 = hex 20
01000000 = dec 64 = hex 40
10000000 = dec 128 = hex 80
 
11111111 = dec 255 = hex FF
00101101 = dec 45 = hex 2D
 
Since they prepend their digits with 0x, that tells you they are using hex so a hex 100 in binary is:
 
100000000
 
so the next value would be:
1000000000
 
which is hex 200.
 
Thus your next value should be 0x00000200
 
Again, I would second Jason's recommendation of looking up hex numbering and bitmasks.  They aren't that complicated.
 
Good luck,
Adam
 
----- Original Message -----
Sent: Thursday, January 05, 2006 2:47 AM
Subject: [personal] [msvc] What is the next flag value I need to use?

        enum CheckFlags
        {
                checkZDifference      = 0x00000001,
                checkElevation        = 0x00000002,
                checkLooseEnd         = 0x00000004,
                checkShortSegment     = 0x00000008,
                checkDuplicateSegment = 0x00000010,
                checkIntersect        = 0x00000020,
                checkADS_NTZ          = 0x00000040,
                checkWater            = 0x00000080,
                checkTopology         = 0x00000100
        };

Is it 0x00002000 ??

I don't fully understand it…

Thanks..

Andrew Truckle
CAD Manager
Atkins Survey and Mapping
Avon Way, Langley Park, Chippenham, Wiltshire. SN15 1GG
Telephone:     01249 455032
Switchboard:  01249 455000
Fax:             01249 455045
E-Mail: [EMAIL PROTECTED]
www.atkinsglobal.com



This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.


_______________________________________________
msvc mailing list
msvc@beginthread.com
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription changes, and list archive.


This message has been scanned for viruses by MailControl

_______________________________________________
msvc mailing list
msvc@beginthread.com
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for 
subscription changes, and list archive.

Reply via email to