5.39.2 Boundaries of a range of values: left right
left (resp. right) takes as argument a range of
values.
left (resp. right) returns the left (resp. right) boundary
of this range.
Note that .. is an infixed operator, therefore:
-
sommet(1..5) is equal to ’..’ and feuille(1..5)
is equal to (1,5).
- the name of the range followed by
[0] returns the operator ..
- the name of the range followed by [1]
(or the left command) returns the left boundary.
- The name of the range followed by [2]
(or the right command)
returns the right boundary.
Input:
(3..5)[0]
or:
sommet(3..5)
Output:
’..’
Input:
left(3..5)
or:
(3..5)[1]
or:
feuille(3..5)[0]
or:
op(3..5)[0]
Output:
3
Input:
right(3..5)
or:
(2..5)[2]
or:
feuille(3..5)[1]
or:
op(3..5)[1]
Output:
5
Remark
left (resp. right) returns also the left (resp. right) member of an
equation (for example left(2*x+1=x+2) returns 2*x+1).