Array.range >= 0.1.2
Purpose
Create an array containing arithmetic progressions
Syntax
Array.range
(
Numberstart= 0
Numberstop
Numberstep= 1
);
This is an implementation of Python's range function
Parameters
start
- The first value
stop
- The value to stop at, not included
step
- The step value
Return values
Array
Examples
Fill in only the stop value
When only supplying a single parameter, it is interpreted as the stop value.
Array.range(10);>>> [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Fill in the start and stop values
Array.range(4, 11);>>> [4, 5, 6, 7, 8, 9, 10]
Fill in the start, stop and step values
Array.range(0, 10, 3);>>> [0, 3, 6, 9]
Array.range(1, 10, 2);>>> [1, 3, 5, 7, 9]
Comments