With a regular array, you must specify its size when you declare it
bit my_array[10];
With a dynamic array you can allocate the size of the array during runtime (hence the term "dynamic").
bit my_dynamic_array[]; // Note size is not specified
...
my_dynamic_array = new[size]; // size is determined at run-time
Also, the array can be "re-sized" at a later point:
my_dynamic_array = new[new_size](my_dynamic_array);
In this case, new memory is allocated, and the old array values are copied into the new memory, giving the effect of resizing the array.
The main characteristic of an associative array is that the index type can be any type - you are not restricted to just integer values. For example, you can use a string as the index to look up an "associated" value.
bit my_assoc_array[string]; // Array stores bits, using a string as an index
...
my_assoc_array["testname"] = 1; //Stores a 1 into the array element indexed by the value "testname"
$display(my_assoc_array["testname"]); // Displays 1
An associative array is also "dynamic", in the sense that it does not have a pre-determined size. However, you do not have to allocate the size - it grows as you add more elements into it.
Regards,
-Kurt