Int within ranges
nrgyzer
nrgyzer at gmail.com
Mon Jun 13 09:15:40 PDT 2011
Hi there,
is there any possibility to get a sliced array from another array
between two ranges like:
int[uint] myArray;
myArray[10] = 1000;
myArray[20] = 2000;
myArray[30] = 3000;
myArray[40] = 4000;
myArray[50] = 5000;
int[] newArray = myArray[>= 20 .. <= 40]; // not able to do this
writeln(newArray); // should print [2000, 3000, 4000]
Is there any way to do this?
More information about the Digitalmars-d-learn
mailing list