[fpc-pascal] Pass open array to static array?
genericptr at gmail.com
Fri Apr 3 10:55:23 CEST 2020
> On Apr 3, 2020, at 3:43 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
> They are neither. They are simply a pointer to the first element and a hidden size argument. For the pointer it is not important where it comes from: a single element, a dynamic array, a static array.
Ah, I see. In the example below the open array is still a dynamic array right? As you said earlier dynamic arrays are never constant/static (for now at least) and therefore [1,2,3] is a dynamic.
procedure DoThis(a: array of integer);
More information about the fpc-pascal