contains(flagset, number)

contains(flagset, number), function

def pure contains(haystack: flagset, needle: number): boolean

Indicates whether the haystack contains the needle.

Example

haystack = union(flag(10), flag(20))
show summary "" a1c2 with 
  contains(haystack, 10) as "Contains 10?" // 'true'
  contains(haystack, 15) as "Contains 15?" // 'false'

Errors

Needle has to be an integer, $\ge$ 0 and $\le$ 63.

The needle has to be an integer, $\ge$ 0 and $\le$ 63.

See also

User Contributed Notes
0 notes + add a note