Array and associative array operations. If a VariantN contains an (associative) array, it can be indexed into. Otherwise, an exception is thrown.
Variant a = new int[10]; a[5] = 42; assert(a[5] == 42); a[5] += 8; assert(a[5] == 50); int[int] hash = [ 42:24 ]; a = hash; assert(a[42] == 24); a[42] /= 2; assert(a[42] == 12);
See Implementation
Array and associative array operations. If a VariantN contains an (associative) array, it can be indexed into. Otherwise, an exception is thrown.