So, just to point out (although I'm sure its been noticed before).
I always thought you could have an unlimited number of flags (it's totally possible to type the expression "Flag 120 is on")
But, you are actually limited to 32 flags (numbered from 0-31)
the weird thing is, you can specify a higher number (like flag 32 for example), but the number loops around.
So. If you set flag 32 on, it actually sets flag 0 on. flag 33 controls flag 1 and so on.
Flags are just booleans, so why on earth you're limited to 32 of them is beyond me. Seems un-duly limiting, but there you go. Just thought I'd point it out. Even though you can speficy flag 100, you're actually just activating flag 7.