{"name":"BIS_fnc_decodeFlags2","title":"BIS fnc decodeFlags2","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_decodeFlags2","revid":327243,"updated":"2022-07-12T22:11:47Z","groups":["Bitwise"],"status":"ok","games":{"arma3":"1.00"},"since":"arma3 1.00","arma3_since":"1.00","description":"Decodes a single scalar into array of unique binary flags (zeroes or ones).\n\n> [!NOTE]\n> The maximal decodable number is **16777215** (224 - 1).","syntaxes":[{"syntax":"[value, size] call BIS_fnc_decodeFlags2","params":[{"name":"value","type":"Number","optional":true,"default":"0","description":"the value to be converted","type_expr":"Number","text":"value: Number - (Optional, default 0) the value to be converted"},{"name":"size","type":"Number","optional":true,"default":"1","description":"wanted array size","type_expr":"Number","text":"size: Number - (Optional, default 1) wanted array size"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"\"boolean\" flags where 0 = false and 1 = true"}}],"examples":[{"code":["private _result = 13 call BIS_fnc_decodeFlags2; // returns [1,0,1,1]"]},{"code":["private _result = [13, 8] call BIS_fnc_decodeFlags2; // returns [1,0,1,1,0,0,0,0]"]}],"see_also":["BIS_fnc_encodeFlags","BIS_fnc_encodeFlags2","BIS_fnc_encodeFlags4","BIS_fnc_encodeFlags8","BIS_fnc_decodeFlags","BIS_fnc_decodeFlags4","BIS_fnc_decodeFlags8"]}