I use it for equipment storage. In my project, the players can own only one of each item type; there is no stacking; Hence, I set each item type to a power of 2 like above. I can then add these items to a single var and get a unique var:
my_equipment= 2+4+8= 14; Thus 14 is a unique number indicating that I own items 2, 4, and 8.
I can then use the "&" command to check to see if I own that item. In an of itself not too amazing, but it sure is efficient and elegant.
What I really like is that using the | command I can add the item BUT ONLY ONCE. That is to say, when I add the item to my equipment I don't ADD like this in
my_equipment+= new_item; //no no no!
No. This suffers from having to institute checks and balances such that if you select the same equipment twice, you don't continuasly add an item. By using the | command
my_equipment= my_equipment|new_item;
no matter how many times you select the same item (for example with a mouse click), you can't set the flag more than once so it automatically doesnt' overset the var.
Hence, using one skill, I can store 19 unique items. Using two skills I can store 361 items, which I find is more than enough for me. While I have no use for it, you could conceivable set three skills to equipment storage (for a total of 6859 items!!!!) and take advantage of vector fuctions to manipulate your equipment.