[fpc-devel]Weird isn't it ?

Anton Tichawa anton.tichawa at chello.at
Wed Feb 12 22:10:51 CET 2003


Hello!

I didn't read all your code. But you should change:

constructor CFile.Create(var AFS:CDataFile;APath:string);

to

constructor CFile.Create(AFS:CDataFile;APath:string);

when AFS is an already constructed class. The reason is that AFS is a pointer 
to the instance. If AFS is already valid, i. e. points to an instance, 
there's no need and even danger when you pass it as var. You should pass a 
class as var only if you intend to make it point to a new or different 
instance.

HTH

Anton Tichawa.

----------

"Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte 
Berechnungen einzuweben."

Doris Langley Moore: Ada, Countess of Lovelace (London 1977).

----------

Anton Tichawa
Volkertstrasse 19 / 20
A-1020 Wien
mobil: +43 664 52 07 907
email: anton.tichawa at chello.at

----------



More information about the fpc-devel mailing list