Previous Up Next

6.37.1  Definition of a range of values: ..

The .. is an infixed operator which sets a range of values; given two real numbers a and b, the range of values between them is denoted a..b.

Warning!
The order of the boundaries of the range is significant. For example, if you input

B:=2..3; C:=3..2,

then B and C are different; B==C returns 0.


Examples.


Since .. is an operator, the parts of an expression can be picked out of it (see Section 6.15.3). In particular, the left and right commands can find the left and right endpoints of a range (see Section 6.3.4, Section 6.15.3, Section 6.38.2, Section 6.40.6, Section 6.55.4 and Section 6.55.5 for other uses of left and right.)


Example:
Input:

R := 2..5

Then:
Input:

sommet(R)

Output:

 .. 

Input:

left(R)

Output:

2

Input:

right(R)

Output:

5

Previous Up Next