...
   Well, perhaps I need to write how I use the enums here...

    From "Apple Filing Protocol Programming Guide":"Apple Filing Protocol 
   Data Types":"Directory Bitmap":
   > enum {
   >    kFPAttributeBit = 0x1,
   >    kFPParentDirIDBit = 0x2,
   >    kFPCreateDateBit = 0x4,
   >    kFPModDateBit = 0x8,
   >    kFPBackupDateBit = 0x10,
   >    kFPFinderInfoBit = 0x20,
   >    kFPLongNameBit = 0x40,
   >    kFPShortNameBit = 0x80,
   >    kFPNodeIDBit = 0x100,
   >    kFPOffspringCountBit = 0x0200,
   >    kFPOwnerIDBit = 0x0400,
   >    kFPGroupIDBit = 0x0800,
   >    kFPAccessRightsBit = 0x1000,
   >    kFPProDOSInfoBit = 0x2000 // AFP version 2.2 and earlier
   >    kFPUTF8NameBit = 0x2000, // AFP version 3.0 and later
   >    kFPUnixPrivsBit = 0x8000 // AFP version 3.0 and later
   > };

   So I want to use these constants in code. To have no huge "k..." name 
   space I have a Module where I want to use enums via "public access".
   So I want to call here e.g. MyModule.DirectoryBitmapConstants.kFPLongNameBit

   When I want to use this in the Bitwise operator I need to cast.

   I think the usage as shown above should be supported without casting.

This is an excellent case where enums are the wrong data type: these
are constants.

To paraphrase what Joe said into a rule-of-thumb: if you need to know
the value assigned to an enum, it probably shouldn't be an enum.

Normally, the first value of an enum is 0 (or 1), and following values
are incremented by 1.  But it shouldn't matter.

Craig

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to