containment test operator
sollya_obj_t sollya_lib_cmp_in(sollya_obj_t, sollya_obj_t)
expr in range1 : (constant, range) -> boolean
range1 in range2 : (range, range) -> boolean
- expr represents a constant expression
- range1 and range2 represent ranges (intervals)
- When its first operand is a constant expression expr,
the operator in evaluates to true iff the constant value
of the expression expr is contained in the interval range1.
- When both its operands are ranges (intervals),
the operator in evaluates to true iff all values
in range1 are contained in the interval range2.
- in is also used as a keyword for loops over the different
elements of a list.
> 5 in [-4;7];
> 4 in [-1;1];
> 0 in sin([-17;17]);
> [5;7] in [2;8];
> [2;3] in [4;5];
> [2;3] in [2.5;5];
> for i in [|1,...,5|] do print(i);
See also: ==
Go back to the list of commands