FLAG – Check if flag is set
This function checks if binary flags are set within a byte, but performed in decimal
number form, to avoid having to convert values to binary. The function returns 1 if the
bits in <check> are also set in<source>.
On the contrary, it returns 0.
FLAG(<source>,<check>)Where:
<source>- The string to search.
<check>- The list of characters to be searched for, within the string.
For example, 7 is binary 00000111, 4 is binary 00000100 and 3 is binary 00000011. The following
command returns 0:
FLAG(7,4)The following command returns
1:
FLAG(7,3)The following command returns
0:
FLAG(4,3)