streaming redux
so
so at so.do
Mon Jan 3 13:21:01 PST 2011
On Mon, 03 Jan 2011 23:02:20 +0200, Steven Schveighoffer
<schveiguy at yahoo.com> wrote:
> On Mon, 03 Jan 2011 15:33:10 -0500, so <so at so.do> wrote:
>
>>> type of (&i)[0..1] is int[]
>>
>> I see what the topic is all about.
>> The trouble is this syntax. You say it is int[], but i couldn't find
>> anything in D reference that explains this.
>> Sorry if i am overlooking something.
>>
>
> Oh that:
>
> http://www.digitalmars.com/d/2.0/arrays.html#slicing
>
> quoted from there:
>
>
> Slicing is not only handy for referring to parts of other arrays, but
> for converting pointers into bounds-checked arrays:
>
> int* p;
> int[] b = p[0..8];
>
> The type of &i is int*, so there you go.
>
> -Steve
Thanks a ton!
Another small but very important feature.
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list