937 shaares
172 private links
172 private links
Both Arrays and Maps use similar syntax, so care is required to ensure the variable is of the correct datatype - this is determined by the first declaration line for the variable:
Using empty [ ] declares a Map:
Local $vVar[] ; A Map
Filling the [ ] with a dimension size declares an Array:
Local $vVar[3] ; An Array
Assigning element values when declaring makes the variable an Array - these three lines are functionally equivalent: