Re: [fpc-pascal] passing a class parameter as a const

2007-01-16 Thread Florian Klaempfl
Michael Van Canneyt schrieb: > > On Tue, 16 Jan 2007, Graeme Geldenhuys wrote: > >> On 1/12/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: >>> It makes no difference, except that you cannot do >>> >>> AObject:=SomeOtherObject; >>> >>> in the first case. >> Does Free Pascal work the same as De

Re: [fpc-pascal] passing a class parameter as a const

2007-01-16 Thread Michael Van Canneyt
On Tue, 16 Jan 2007, Graeme Geldenhuys wrote: > On 1/12/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: > > It makes no difference, except that you cannot do > > > > AObject:=SomeOtherObject; > > > > in the first case. > > Does Free Pascal work the same as Delphi 7 and earlier when you pass

Re: [fpc-pascal] passing a class parameter as a const

2007-01-15 Thread Graeme Geldenhuys
On 1/12/07, Michael Van Canneyt <[EMAIL PROTECTED]> wrote: It makes no difference, except that you cannot do AObject:=SomeOtherObject; in the first case. Does Free Pascal work the same as Delphi 7 and earlier when you pass interfaces around (and perhaps other auto reference counted types - st

Re: [fpc-pascal] passing a class parameter as a const

2007-01-12 Thread Michael Van Canneyt
On Fri, 12 Jan 2007, Graeme Geldenhuys wrote: > Hi > > Does passing a class parameter as a const make any difference? > > eg: > > Add(const AObject: TtiObject); > > vs > > Add(AObject: TtiObject); > > > >From what I can see it shouldn't. Most Delphi code and Free Pascal > FCL code

[fpc-pascal] passing a class parameter as a const

2007-01-12 Thread Graeme Geldenhuys
Hi Does passing a class parameter as a const make any difference? eg: Add(const AObject: TtiObject); vs Add(AObject: TtiObject); From what I can see it shouldn't. Most Delphi code and Free Pascal FCL code doesn't use 'const' for class parameters. -- Graeme Geldenhuys There's n