ID:1645854
 
(See the best response by DarkCampainger.)
I'm doing something with bitflags, and I want to #define a number as ALL_FLAGS so I can just set the variable on some mobs to ALL_FLAGS so I don't have to go back to all things that should have all flags every time a new flag is added.

However, I have no idea what this number should be.
Experiments point out that 524288 should be the largest number (that is not automatically turned into stuff like 1.20654e+006), but 524289 also works fine and is not turned into scientific notation.

(While it is unlikely that I will ever need 19 flags, this #define would also be used for other things)
I wonder if 1.#INF would work.
Best response
BYOND uses single-precision floating point for its numbers, and only supports bit-wise operations for the first 16 bits (between 0 and 65535), so a value of 65535 would set all of those bits to 1.
Thanks, that's what I wanted to know.
You can also save yourself the work of figuring out what it needs to be.

#define FLAG_ONE 1
#define FLAG_TWO 2
#define FLAG_THREE 4
#define FLAG_FOUR 8

#define FLAG_ALL FLAG_ONE|FLAG_TWO|FLAG_THREE|FLAG_FOUR


Now setting a bitflag to FLAG_ALL will enable all of the FLAG_ bits you have defined there.
That would defeat the point though. If I added a new flag I would still have to add it to that #define and I would not be able to use the #define for other bitflags.
It doesn't really defeat the purpose, you're still not having to go back to every place you've used FLAG_ALL to change it, just the one place. I get what you wanted though originally and the answer provided will do what you need, I was just elaborating on a method to combine the value of multiple flags without having to worry about the math involved -- mostly for other people reading this interested in using bitflags (and you, in case you didn't know of it but I figured you probably had an idea)
The DM Guide mentions the 16-bit limit in pretty much every bitwise operator's entry.

~0 would be every available bit on, by the way. It's a much easier way of writing 65535.