A range represents a list of values between its first and last. The lower limit is the first value and the upper limit is the last value. The range between 1 an
A range represents a list of values between its first and last. The lower limit is the first value and the upper limit is the last value. The range between 1 and 6 is 2, 3, 4, and 5.
Range may refer to: values in a variable or array, an operator, a data type, or to be used instead of an iterator.
Below are some notable languages using the range operator (..):
string items[] = ["one","two","three","four"];
string first_three_items[] = items[0..2];
[1..6]
for(1..6) { print }
for (i in 1..6) print(i)
for i in 1..6 { print(i) }
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.