{"name":"BIS_fnc_bitflagsToArray","title":"BIS fnc bitflagsToArray","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_bitflagsToArray","revid":328601,"updated":"2022-07-13T17:02:31Z","groups":["Bitwise"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Returns array with all bit flags which are set in the given flagset\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 call BIS_fnc_bitflagsToArray","params":[{"name":"flagset","type":"Number","description":"decimal or hexadecimal unsigned 24 bit integer","type_expr":"Number"}],"returns":{"type":"Array","type_expr":"Array","description":"array of set bit flags"}}],"examples":[{"code":["15 call BIS_fnc_bitflagsToArray; // [1,2,4,8]\n2342 call BIS_fnc_bitflagsToArray; // [2,4,32,256,2048]\n[2 + 4 + 8] call BIS_fnc_bitflagsToArray; // [2,4,8]\n[2 + 2 + 2 + 4 + 8 + 8 + 8] call BIS_fnc_bitflagsToArray; // [2,32]"]}],"see_also":["BIS_fnc_bitflagsFlip","BIS_fnc_bitflagsSet","BIS_fnc_bitflagsCheck","BIS_fnc_bitflagsUnset"]}