Dynamic array + AA array
Brett at gmail.com
Tue Sep 17 16:50:46 UTC 2019
On Tuesday, 17 September 2019 at 15:51:34 UTC, Andrea Fontana
> On Tuesday, 17 September 2019 at 14:33:30 UTC, Brett wrote:
>> The idea is to basically use a dynamic array for most of the
>> items, then an array to get the rest.
>> T Base;
>> T[int] Rest;
>> Then if Base has a max size(usually it might be fixed due to
>> some algorithm) the Rest AA can pick up any outside values
>> The idea here is to be able to combine them as one "infinite"
>> array of T.
>> Any indexing outside of Base gets carried in to Rest.
> What if I try to read an index that was not assigned?
> What if I try a foreach on it?
It all has to function as an single array.
If you try to read an index that wasn't assigned to a normal
array or AA what happens?
If you try a foreach on a normal array or AA what happens?
More information about the Digitalmars-d-learn