Jürgen Hestermann schrieb:
>> David Emerson schrieb:
>> I *am* checking sizes before the move, which is why it surprised me
>> that things were going out of bounds -- the trouble is I forgot the
>> array index [0]
> 
> Yes, that happens quite often. Unfortunately, Borland gave up the clear
> und predictable context independend Pascal syntax when implementing
> dynamic data structures. 

Simply because dereferencing a dyn. arrays makes no sense because
it is more than just a simply data collection.

> Dynamic arrays are actually *pointers* to the
> data while static arrays are the data itself. But the pointers of
> dynamic arrays are dereferenced automatically when used except for
> fundamental byte functions like move or fillchar. 

This is plainly wrong. When indexing a dyn. array, the compiler
generates the correct code to access the data, no more no less.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to