All Downloads are FREE. Search and download functionalities are using the official Maven repository.

reference.language.membership.html Maven / Gradle / Ivy




    
    Membership expressions
    
    

    
    

    
    

    
    
    
    

    


Membership expressions

Membership expressions are used to check that a value is a member of a collection value.
An membership expression is a code fragment which produces a Boolean value, which can then be used as an input for other operations: print, write, method call and so forth.
Membership expressions can have one of the following forms:

  • a in b, where a is any value and b is a collection
  • b contains a, where a is any value and b is a collection
  • a contains any b, where a and b are collections
  • a contains all b, where a and b are collections
Or the negative forms:
  • a not in b, where a is any value and b is a collection
  • b not contains a, where a is any value and b is a collection
  • a not contains any b, where a and b are collections
  • a not contains all b, where a and b are collections

Text membership

Text membership expressions check whether a Character or Text value belongs to a given Text value.
When checking for any or all, the collection of characters can be specified using a Text, which is then treated as collection of characters.

Range membership

Range membership expressions check whether a value belongs to a given Range value.

List membership

List membership expressions check whether a value belongs to a given List value.

Set membership

Set membership expressions check whether a value belongs to a given Set value.

Tuple membership

Tuple membership expressions check whether a value belongs to a given Tuple value.

Dictionary membership

Dictionary membership expressions check whether a Dictionary value contains a given Text key.
They are equivalent to using Set membership expressions on dict.keys.
To check for value membership, you should use membership expressions on dict.values.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy