On Fri, 11 Jul 2014 07:46:37 -0700
"H. S. Teoh via Digitalmars-d-learn"
wrote:
> On Fri, Jul 11, 2014 at 10:23:58AM -0300, Ary Borenszweig via
> Digitalmars-d-learn wrote:
> > On 7/11/14, 4:46 AM, bearophile wrote:
> > >pgtkda:
> > >
> > >>How can i get the number of items which are currently hold
On Friday, 11 July 2014 at 14:48:26 UTC, H. S. Teoh via
Digitalmars-d-learn wrote:
On Fri, Jul 11, 2014 at 10:23:58AM -0300, Ary Borenszweig via
Digitalmars-d-learn wrote:
On 7/11/14, 4:46 AM, bearophile wrote:
>pgtkda:
>
>>How can i get the number of items which are currently hold
>>in a
>>DL
On Fri, Jul 11, 2014 at 10:23:58AM -0300, Ary Borenszweig via
Digitalmars-d-learn wrote:
> On 7/11/14, 4:46 AM, bearophile wrote:
> >pgtkda:
> >
> >>How can i get the number of items which are currently hold in a
> >>DList?
> >
> >Try (walkLength is from std.range):
> >
> >mydList[].walkLength
> >
Ary Borenszweig:
So the doubly linked list doesn't know it's length? That seems
a bit inefficient...
Have you tried to compile mydList.length or mydList[].length? If
both don't compile, then you have to walk the items.
Walking the items is not efficient, but:
- Linked lists are very uncommo
On 7/11/14, 4:46 AM, bearophile wrote:
pgtkda:
How can i get the number of items which are currently hold in a DList?
Try (walkLength is from std.range):
mydList[].walkLength
Bye,
bearophile
So the doubly linked list doesn't know it's length? That seems a bit
inefficient...
pgtkda:
How can i get the number of items which are currently hold in a
DList?
Try (walkLength is from std.range):
mydList[].walkLength
Bye,
bearophile
How can i get the number of items which are currently hold in a
DList?