On 15/11/2011, Martin Schreiber <mse00000@g.....> wrote:
>

Thanks Martin. Extending my example by changing the body of foo() too...

  AClass.Free;
  AClass := TStringList.Create;
  AClass.Add('inside foo');

...reveals a bit more about the differences.



>> procedure foo(const AClass: TStringList);
>>
> Take a copy of the AClass instance pointer, AClass is readonly.


This one confused me a bit. I thought the whole object would be
read-only, but in fact it is just the AClass instance pointer which
cannot be modified. The properties of AClass are still read-write.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to