Next: , Previous: import, Up: Reference



in

Synopsis

As part of the set membership test, as a boolean expression:

     ordinal_value in set_expression

or, as part of a for loop iterating through a set:

     for ordinal_variable in set_expression do ...

Description

When in is used as a membership test, it acts as a binary operator taking ordinal_value as its left parameter and set_expression as its right parameter and returning a boolean result which is true if set_expression contains the element ordinal_value.

When in is used as part of a for loop, it iterates ordinal_variable over the elements contained in set_expression, that is every ordinal_value that would return true if tested as ordinal_value in set_expression.

Conforming to

in is defined in ISO 7185 Pascal and supported by all known Pascal variants.

Example

Set set

See also

Keywords, Set Operations, set, Exclude, Include, for.