--- Cyhawk <[EMAIL PROTECTED]> wrote: > Hey all, my question involves flags. As i understand it, diku dirvs use > letter flags to represent numbers (like PLR_ flags) and i know theyre > powers of two ths allowing for easy addition of more 'flags' to the > equasion.. I also noticed the max you can use is dd (30 letters) > (1073741824) without causing issues. My question is, what determines the > max number you can use? Is it complier controled, CPU architechture > controled? Just curious on how the thing works more indepth =) >
It's the data type used to store the flags, which in this case is a long int. On most archetectures the size of a long int is 32 bits (with one being used to denote positive or negative). You should probably consider using a larger data type (or a dynamic flag system) if you need more than that. For example, you can increase the size of your flags to 64 bits by using the (now standard) uint64_t data type. I typically find that 64 bits is sufficient for any flag variable. If I need more than that, they probably can (and should) be refactored into a more manageable data type. ~Kender ===== -----BEGIN GEEK CODE BLOCK----- Version 3.1 GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$ P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@ b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++ ------END GEEK CODE BLOCK------ __________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/

