On Thu, 7 Jul 2011, Chad Berchek wrote:


Michael wrote:
You can always fool the compiler. The compiler trusts you and assumes
that what you tell her is true...

Yes, of course you can always fool the compiler, it just shouldn't be
the other way around. The example you gave is very different for one
very important reason: you show using explicit allocating and freeing of
an object. With strings, the programmer does not, and cannot, explicitly
allocate or deallocate the resources, and the problem lies in the
behavior of the automatic allocation and deallocation. Thus there is
nothing in common between this example and the problem at hand.

Nonsense.

The example is reproducible just as well with shortstrings or plain records,
where there is no 'allocation' or 'Deallocation'. Such examples can wreak
havoc just as much. With the example I showed, it's just much more clear.
(i.e. a straight crash)

Michael.
_______________________________________________
fpc-devel maillist  -  [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to