Re: Why does reverse also flips my other dynamic array?

2015-09-14 Thread Marco Leise via Digitalmars-d-learn
Thanks for the clarification.

Re: Why does reverse also flips my other dynamic array?

2015-09-13 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, September 13, 2015 17:17:01 Ali Çehreli via Digitalmars-d-learn wrote: > On 09/13/2015 08:21 AM, Jonathan M Davis via Digitalmars-d-learn wrote: > > On Saturday, September 12, 2015 14:59:23 Ali Çehreli via > Digitalmars-d-learn wrote: > >> On 09/12/2015 02:29 PM, Marco Leise wrote: >

Re: Why does reverse also flips my other dynamic array?

2015-09-13 Thread Ali Çehreli via Digitalmars-d-learn
On 09/13/2015 08:21 AM, Jonathan M Davis via Digitalmars-d-learn wrote: > On Saturday, September 12, 2015 14:59:23 Ali Çehreli via Digitalmars-d-learn wrote: >> On 09/12/2015 02:29 PM, Marco Leise wrote: >> >> > Note that often the original dynamic array has additional >> > capacity beyond

Re: Why does reverse also flips my other dynamic array?

2015-09-12 Thread Ali Çehreli via Digitalmars-d-learn
On 09/12/2015 02:29 PM, Marco Leise wrote: > Note that often the original dynamic array has additional > capacity beyond its length. This can be used to ~= additional > items without causing a reallocation, but is lost when you > do the assignment "b = a". Actually, the capacity is still there,

Re: Why does reverse also flips my other dynamic array?

2015-09-12 Thread Marco Leise via Digitalmars-d-learn
Am Sat, 12 Sep 2015 10:55:50 + schrieb "Namal" : > > Why is also b flipped here? This doesn't happen if I use static > > arrays. > > nvm. I need to .dup that. Correct, static arrays are value types and copied on assignment. Dynamic arrays on the other hand are generally

Re: Why does reverse also flips my other dynamic array?

2015-09-12 Thread Namal via Digitalmars-d-learn
Why is also b flipped here? This doesn't happen if I use static arrays. nvm. I need to .dup that.