On Wed, 13 Mar 2013 11:32:43 +0000
Howard Page-Clark <h...@talktalk.net> wrote:

> On 13/03/13 9:50, Mattias Gaertner wrote:
> > On Wed, 13 Mar 2013 09:35:43 +0000
> > Howard Page-Clark <h...@talktalk.net> wrote:
> >
> >> On 12/03/13 8:30, Xiangrong Fang wrote:
> >>> TMyClass = class
> >>>       myarray: array[0..100] of Integer;
> >>> end;
>[...]
> Could you show a more complex test that would give a satisfactory 
> answer to the OP's questions?

Xiangrong wanted to know if the above array is initialized.
If you want to test that then you have to either single step via
the debugger or to compare the allocated memory before and after.
The problem is that you do not know the memory position before the
allocation. 
You can try to create the class, change it, free it and
allocate it again. If the two instances are at the same position, then
you can check for 0 or nil.


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

Reply via email to