contains(flagset, number)

There are other functions named contains() with different numbers of arguments.
See the entire list.

contains, function

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

Indicates whether the 64-set haystack contains the element needle.

Examples

haystack = union(flag(10), flag(20))

show table "Contains" with
  contains(haystack, 10) as "Contains 10"
  contains(haystack, 15) as "Contains 15"

Output:

Contains 10 Contains 15
true false

Errors

Needle has to be an integer, >= 0 and <= 63.

The needle must be an integer in the range [0..63].

Remarks

This function is usable in dash expressions.

See also

User Contributed Notes
0 notes + add a note