[fpc-pascal] dynamic array contents and system.move
juergen.hestermann at gmx.de
Wed May 5 07:34:41 CEST 2010
> So why is it a problem, that one is a pointer, and the other not?
> Because it is easier, or more often overlooked.
The problem is not that one is a pointer (to an array) and the other one is the array itself. That would be fine if it is told to the programmer that way and if it would be consistent. But then why am I not able to derefference this pointer with MyArray^? Why can I use an index on that pointer? In these cases it does *not* behave like a pointer but like an array. That's what makes it ambiguous.
So at least I would expect that these realy confusing things are clearely explained in the help so that a programmer is not lead to false assumptions. Say that it is a pointer to an array (and do not let the user think it is "an array"!). And say that although it is a pointer you still cannot derefference it but you need to use the first index to get the beginning of the array.
More information about the fpc-pascal