What does it mean: buffer[0 .. kSize] = input[index .. (index + Size)];
t0mek
t0mek at com.com.com.com.com
Fri Jul 25 01:50:36 PDT 2008
Hello,
I found some code in D and I am wondering what does it mean:
buffer[0 .. Size] = input[index .. (index + Size)];
I understand it can be written like this:
for (i=0; i<Size; i++) buffer[i]=input[i+index];
But...
1) does it allocate space for buffer?
2) if buffer has already some data- will be zeroed?
3) if there is no enough date (less then Size) in input will there be an
exception or will be copied what already is in the array?
Regards,
t0mek
More information about the Digitalmars-d-learn
mailing list