{"name":"BIS_fnc_bitflagsFlip","operator":null,"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","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.66"}],"since":{"game":"arma3","name":"Arma 3","version":"1.66"},"arma3_since":"1.66","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Flips one or more flags (set gets unset and vice versa) in the given flagset, represented with decimal or hexadecimal number\n\n(Hexadecimal number representation is simply auto-converted into decimal by the engine)\n\nTo check which flags are present in given flagset use BIS_fnc_bitflagsToArray\n\n**Limitations**:\n\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","since":null,"effect":null,"exec":null,"params":[{"name":"flagset","type":"Number","optional":false,"default":null,"description":"flagset","types":["Number"],"since":null,"text":"flagset: Number - flagset"},{"name":"flag","type":"Number","optional":false,"default":null,"description":"one or more flags to flip","types":["Number"],"since":null,"text":"flag: Number - one or more flags to flip"}],"returns":{"type":"Number","types":["Number"],"description":"new flagset with given flag or flags flipped","text":"Number  - new flagset with given flag or flags flipped"}}],"examples":[{"text":"```sqf\n[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)\n```","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)"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_bitflagsSet","BIS_fnc_bitflagsCheck","BIS_fnc_bitflagsToArray","BIS_fnc_bitflagsUnset"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Bitwise","Functions","Introduced with Arma 3 version 1.66"],"docblock":null,"filled_from_docblock":[]}