{"name":"BIS_fnc_bitflagsFlip","title":"BIS fnc bitflagsFlip","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_bitflagsFlip","revid":328595,"updated":"2022-07-13T17:02:29Z","groups":["Bitwise"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Flips one or more flags (set gets unset and vice versa) in the given flagset, represented with decimal or hexadecimal number\n(Hexadecimal number representation is simply auto-converted into decimal by the engine)\nTo check which flags are present in given flagset use BIS_fnc_bitflagsToArray\n\n**Limitations**:\nDue to various limitations of the Real Virtuality engine this function is\nintended to work with unsigned 24 bit integers only. This means that the\nsupported range is 2^0...2^24 (1...16777216)","syntaxes":[{"syntax":"[flagset, flag] call BIS_fnc_bitflagsFlip","params":[{"name":"flagset","type":"Number","description":"flagset","type_expr":"Number"},{"name":"flag","type":"Number","description":"one or more flags to flip","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"new flagset with given flag or flags flipped"}}],"examples":[{"code":["[1 + 16, 8] call BIS_fnc_bitflagsFlip; // 25 (which is 1 + 8 + 16)\n[25, 8] call BIS_fnc_bitflagsFlip; // 17 (which is 1 + 16)\n[2 + 4 + 8, 2 + 8] call BIS_fnc_bitflagsFlip; // 4\n[4, 2 + 8] call BIS_fnc_bitflagsFlip; // 14 (which is 2 + 4 + 8)"]}],"see_also":["BIS_fnc_bitflagsSet","BIS_fnc_bitflagsCheck","BIS_fnc_bitflagsToArray","BIS_fnc_bitflagsUnset"]}