[fpc-pascal]Destroy Instance
Andrew J.Swan [home]
ajs at nuvse.com
Tue Jan 28 22:18:32 CET 2003
* Luis Del Aguila [LDA] [Tuesday, January 28, 2003] wrote:
* subject: [fpc-pascal]Destroy Instance
* msgid:00af01c2c6fb$8a85a320$491e30c8 at mesajil
LDA> Type
LDA> TClase1 = Class
LDA> campo1:string;
LDA> End;
LDA> TClase2 = Class (TClase1)
LDA> campo2:string;
LDA> End;
LDA> Var b:Tclase2;
LDA> Begin
LDA> b:=TClase2.create;
LDA> b.campo1:='hola';
LDA> b.campo2:='hola2';
LDA> Writeln(b.campo2);
LDA> b.destroy; //if destroy the instance .
b.Free ;
LDA> Writeln(b.campo2); // Why the instance exist?
LDA> Write('presione enter para terminar');readln
LDA> End.
8o)
* Best regards ...
--
` _ , ' :: Linux Registered User [#168882]
- (o)o) - :: The-Bat! 1.63 Beta/5
-ooO'(_)--Ooo---- :: Weakened by Windows 98/4.10.2222 A
- They might or they might not, You never can tell with bees. -- [Winnie-the-Pooh]
>mid:00af01c2c6fb$8a85a320$491e30c8 at mesajil
More information about the fpc-pascal
mailing list