Hello, folks! Newbie to D, have some questions!

timmyjose via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Feb 21 09:19:06 PST 2017


On Monday, 20 February 2017 at 17:43:22 UTC, Ali Çehreli wrote:
> On 02/20/2017 07:00 AM, timmyjose wrote:
>
> > slice can be spawned off into a brand new array upon
> assigning data to
> > it (in the book "Learning D", which I find very nice so far).
>
> It's not assigning data to a slice, but adding elements to it: 
> It *may* spawn off a new array. You can use .capacity to see 
> whether that will be the case:
>
>   http://ddili.org/ders/d.en/slices.html#ix_slices..capacity
>
> Related to your earlier question on multi-dimensional array 
> syntax, which you seem to find "brilliant": :)
>
>
> http://ddili.org/ders/d.en/slices.html#ix_slices.multi-dimensional%20array
>
> Also, there is the following article which explains the inner 
> workings of slices:
>
>   https://dlang.org/d-array-article.html
>
> Ali

You're absolutely right! It was badly worded on my part.  And 
thanks for the links, they really do help! :-)


More information about the Digitalmars-d-learn mailing list