Range Operator

Lists of consecutive numbers can be constructed quite easily using the Range operator. Range has the format x1..*xn where x1 is the lower limit and xn* is the upper limit.

See Range.

For example, you can construct a list of numbers from 1 to 6 using the definition:

List:=1..6

The expression 1..6 is equivalent to the expression [1,2,3,4,5,6]. Similarly, 6..1 is equivalent to [6,5,4,3,2,1].

Normally, a range is sequential from x1 to xn in steps of one. You can specify a different step size in either of two ways. First, by specifying a pattern to follow (e.g., [x1,x2]..xn); or second, by explicitly specifying a step size (e.g., x1..[xn,step]). For example, [1,1.5]..3 and 1..[3,0.5] are both equivalent to [1,1.5,2,2.5,3].

See Create Lists.