On Sunday, 9 August 2015 at 20:38:05 UTC, drug wrote:
09.08.2015 23:22, Reflexive пишет:
Try to use
this.sabotarray = this.sabotarray.remove(id_card);
remove() removes element(s) but doesn't change length of 'old'
array. To get new length you should use 'new' array that
returned from remove
09.08.2015 23:22, Reflexive пишет:
Try to use
this.sabotarray = this.sabotarray.remove(id_card);
remove() removes element(s) but doesn't change length of 'old' array. To
get new length you should use 'new' array that returned from remove().
In this case I get rid of two excessive kings in ca
On Sunday, 9 August 2015 at 20:23:00 UTC, Reflexive wrote:
I see that remove() removes the value of the element but keeps
the same size of the array, and replace the value by a new one
at the end. The method :
class sabot{
card[] sabotarray ;
(...)
card getCard(){
On Sunday, 9 August 2015 at 15:41:33 UTC, Alex Parrill wrote:
Why not just use std.random.shuffle [1]?
Well, I didn't knew about it, that's the reason ...
For the shuffle method, it is certainly the best to do, but I
need the remove() method at other places. I see that remove()
removes the
On Sunday, 9 August 2015 at 15:30:32 UTC, Reflexive wrote:
I wrote import std.algorithm.remove ;, and I dont have any
longer any error. But, it dont want to remove the item. Here is
the source, the problem is in the shuffle() method :
...
Why not just use std.random.shuffle [1]?
import
I wrote import std.algorithm.remove ;, and I dont have any longer
any error. But, it dont want to remove the item. Here is the
source, the problem is in the shuffle() method :
// sabot.d
// version 0.0.1
import std.stdio ;
import std.random ;
import std.algorithm : remove ;
void main(){
On Sunday, 9 August 2015 at 14:24:38 UTC, Reflexive wrote:
Error: module remove is in file 'std/algorithm/remove.d' which
cannot be read
remove() is a function in module std.algorithm:
import std.algorithm: remove;
remove(foo);
On 10/08/2015 2:24 a.m., Reflexive wrote:
On Sunday, 9 August 2015 at 13:40:51 UTC, cym13 wrote:
On Sunday, 9 August 2015 at 13:22:02 UTC, Reflexive wrote:
You can use std.algorithm.remove for that. If you need more advanced
ways to remove elements, you may want to switch from a regular dynamic
On Sunday, 9 August 2015 at 13:40:51 UTC, cym13 wrote:
On Sunday, 9 August 2015 at 13:22:02 UTC, Reflexive wrote:
You can use std.algorithm.remove for that. If you need more
advanced ways to remove elements, you may want to switch from a
regular dynamic array to a std.container.array.
I get
On Sunday, 9 August 2015 at 13:22:02 UTC, Reflexive wrote:
Hi
I have seen that it is possible to remove an element from a
associative array, but dont find any reference, including in
D's specification, about any element removing in dynamic array.
I can use loops for that, but isnt any way to
10 matches
Mail list logo