View mode: basic / threaded / horizontal-split · Log in · Help
August 05, 2004
How do you duplicate an AA?
I have an AA, and I cannot call aa.dup, as the compiler says:

No property 'dup' for 'char[][char[]]'

How can I do it?

Scott
August 05, 2004
Re: How do you duplicate an AA?
stonecobra wrote:
> I have an AA, and I cannot call aa.dup, as the compiler says:
> 
> No property 'dup' for 'char[][char[]]'
> 
> How can I do it?

dup would be nice, but you can also do this:

  char[][char[]] a = <whatever>;
  char[][char[]] copy;
  foreach(char[] key, char[] value; a)
    copy[key] = value;
Top | Discussion index | About this forum | D home