The OpenD Programming Language

dup

Creates a new associative array of the same size and copies the contents of the associative array into it.

Parameters

aa T*

The associative array.

Examples

auto aa = ["k1": 2];
auto a2 = aa.dup;
aa["k2"] = 3;
assert("k2" !in a2);

Meta