Function range()

← Back to Module core



Module core → range()

Description

Create an array filled with a sequence of numbers, starting from begin to end and incremented by step

range(begin, end, step = 1)


Parameters


Return Value


Usage Example

a = range(2, 5)
 
' a is:
' array(
'     [0] = 2,
'     [1] = 3,
'     [2] = 4,
'     [3] = 5
' )
 
b = range(1, 0, -0.1)
 
' b is:
' array(
'     [0] = 1
'     [1] = 0.9
'     [2] = 0.8
'     [3] = 0.7
'     [4] = 0.6
'     [5] = 0.5
'     [6] = 0.4
'     [7] = 0.3
'     [8] = 0.2
'     [9] = 0.1
'     [10] = 0
' )


Availability

This function is available on Dinfio version 3.2.01 or later