Florian Klaempfl wrote on Tue, 13 Oct 2009:

When messing with pointers you've to know what to write because pointers
allow unlimited access to internal data structures. Sorry, but I can't
help you if you guess wrong while playing with dangerous stuff (and the
original poster did so: using move is a dangerous operation) instead of
reading the manual.

I think that "all pointers can be indexed as arrays" can easily cause accidentantal errors though. I can't find it anymore, but I remember Pierre once fixed a bug in the compiler sources itself where someone accidentally used move(pstring_var[1],...) instead of move(pstring_var^[1],..). That at least was not a case of not understanding how pointers work, but a simple case of a typo which couldn't be caught anymore by the compiler due to this extension.


Jonas

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to