/* This unsets the Protected flag without affecting the status of
any of the other flags in vReflectFlag. */
vReflectFlag = vReflectFlag:UnsetFlag(Permission:Protected).
You can use a bitwise NOT operation to achieve the same result. For example, replacing the last line with vReflectFlag = vReflectFlag AND NOT Flags:Protected also unsets the Protected flag.
Notes
This method is available for all built-in flag enums, and the compiler automatically generates it for all user-defined flag enums. For example, this code excerpt uses a user-defined Permission flag enum, initializes vPerm with the Create and Delete flags set, and then uses UnsetFlag( ) to unset the Delete flag: