[fpc-pascal] dynamic array contents and system.move
juergen.hestermann at gmx.de
Sun Apr 25 19:13:00 CEST 2010
>> True. As I said: There is no common logic what the identifier "MyArray"
>> means if it is a dynamic array (but there is for static arrays).
> It means the whole array (which is an opaque type). No more no less.
Then it should be possible to use "MyArray" as a parameter for move/fillchar but obviously this is not the case.
>> It's true that it ignores all *type* info. Still there was no ambigouity
>> about the starting address of a variable you give as parameter until
>> dynamic arrays were introduced (including AnsiStrings).
> The same applies to classes.
Maybe, but why not simply use the starting address of the array when using "MyArray" as parameter for fillchar/move? It would have avoided a lot of trouble.
More information about the fpc-pascal