Re: canFind doesn't work on Array, replacing [] with array doesn't work, etc...

2016-06-18 Thread Joerg Joergonson via Digitalmars-d-learn
On Saturday, 18 June 2016 at 17:46:26 UTC, ag0aep6g wrote: On Saturday, 18 June 2016 at 17:02:40 UTC, Joerg Joergonson wrote: 3. can't use canFind from algorithm. Complains it can't find a matching case. I tried many variations to get this to work. canFind takes a range. Array isn't a range

Re: canFind doesn't work on Array, replacing [] with array doesn't work, etc...

2016-06-18 Thread ag0aep6g via Digitalmars-d-learn
On Saturday, 18 June 2016 at 17:02:40 UTC, Joerg Joergonson wrote: 3. can't use canFind from algorithm. Complains it can't find a matching case. I tried many variations to get this to work. canFind takes a range. Array isn't a range itself, but you can get one by slicing it with []:

canFind doesn't work on Array, replacing [] with array doesn't work, etc...

2016-06-18 Thread Joerg Joergonson via Digitalmars-d-learn
Have working code that uses []. Trying to replace with Array! 1. Can't use make in field initialization. Complains about malloc in static context. 2. can't decrement the length. So Darr.length = Darr.length - 1; fails This means we can't remove the element easily. I see a removeBack but