Documentation
¶
Overview ¶
Functions and constants to do with integers and generating sequences of integers.
Index ¶
Examples ¶
Constants ¶
View Source
const ( MaxUint = ^uint(0) MinUint = 0 MinInt = -MaxInt - 1 MaxInt = int(MaxUint >> 1) )
Variables ¶
This section is empty.
Functions ¶
func Range ¶
Generates an integer array with indices from start to end with the given step value.
Returns an empty array if step is equal to 0 or end is less than start and step is a positive number.
Example ¶
Counting down from 10 in intervals of 2.
The Range function is similar to the range function in Python.
r := Range(10, 0, -2) fmt.Println(r)
Output: [10 8 6 4 2 0]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.