open-array-parameters

When an Open Array Parameter isn't so Open

I was looking at http://stackoverflow.com/q/3780235/71200 and started experimenting. What I discovered is rather interesting. procedure Clear(AArray: array of Integer); var I: Integer; begin for I := Low(AArray) to High(AArray) do AArray[I] := 0; end; var MyArray: array of Integer; begin Clear(MyArray); end. This simple l...