Re: Local fixed sized arrays

2016-06-30 Thread Johan Engelen via Digitalmars-d-learn
On Monday, 27 June 2016 at 21:58:04 UTC, "Smoke" Adams wrote: I'm in need of a way to create a local array that isn't GC'ed. It must be dynamic in the sense of setting the size at compile time but it will be used only in scope and only on structs. `alloca` is made for that purpose. https://dla

Re: Local fixed sized arrays

2016-06-27 Thread Ali Çehreli via Digitalmars-d-learn
On 06/27/2016 04:02 PM, Smoke Adams wrote: > On Monday, 27 June 2016 at 22:56:35 UTC, Ali Çehreli wrote: >> On 06/27/2016 02:58 PM, Smoke Adams wrote: >>> I'm in need of a way to create a local array that isn't GC'ed. It must >>> be dynamic in the sense of setting the size at compile time but it w

Re: Local fixed sized arrays

2016-06-27 Thread Smoke Adams via Digitalmars-d-learn
On Monday, 27 June 2016 at 22:56:35 UTC, Ali Çehreli wrote: On 06/27/2016 02:58 PM, Smoke Adams wrote: I'm in need of a way to create a local array that isn't GC'ed. It must be dynamic in the sense of setting the size at compile time but it will be used only in scope and only on structs. func

Re: Local fixed sized arrays

2016-06-27 Thread Ali Çehreli via Digitalmars-d-learn
On 06/27/2016 02:58 PM, Smoke Adams wrote: I'm in need of a way to create a local array that isn't GC'ed. It must be dynamic in the sense of setting the size at compile time but it will be used only in scope and only on structs. function x(int y) { bool[y] arr; arr ~= 3; } I care abou

Local fixed sized arrays

2016-06-27 Thread Smoke Adams via Digitalmars-d-learn
I'm in need of a way to create a local array that isn't GC'ed. It must be dynamic in the sense of setting the size at compile time but it will be used only in scope and only on structs. function x(int y) { bool[y] arr; arr ~= 3; } I care about slicing or anything but appending, removal