BIS fnc bitflagsCheck: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " +(spawn|call) +'''([a-zA-Z0-9_]+)'''[ ]* " to " $1 $2 ")
m (Text replacement - " \| *p([0-9]{1,2}) *= *(.+) * + \| *(\[\[Bool.+) * " to " |p$1=$2 |r1=$3 ")
Line 19: Line 19:
|p2= flag: [[Number]] - one or more flags to check
|p2= flag: [[Number]] - one or more flags to check


| [[Boolean]]  
|r1=[[Boolean]]
* [[true]]: one or more flags are set in given flagset
* [[true]]: one or more flags are set in given flagset
* [[false]]: no given flag or flags are set in the given flagset
* [[false]]: no given flag or flags are set in the given flagset

Revision as of 05:12, 13 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Bitwise

Syntax

Syntax:
[flagset, flag] call BIS_fnc_bitflagsCheck
Parameters:
flagset: Number - flagset
flag: Number - one or more flags to check
Return Value:
Boolean
  • true: one or more flags are set in given flagset
  • false: no given flag or flags are set in the given flagset

Examples

Example 1:
[2 + 4 + 8, 8] call BIS_fnc_bitflagsCheck; // true [2 + 4 + 8, 2 + 32] call BIS_fnc_bitflagsCheck; // true [2 + 4 + 8, 1] call BIS_fnc_bitflagsCheck; // false [2 + 4 + 8, 1 + 32] call BIS_fnc_bitflagsCheck; // false

Additional Information

See also:
BIS fnc bitflagsFlipBIS fnc bitflagsSetBIS fnc bitflagsToArrayBIS fnc bitflagsUnset

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note