type TObject extends object
declare abstract operator cast as any ptr
declare abstract sub Create
end type
type TFrame extends TObject
declare virtual operator cast as any ptr
declare virtual sub Create
declare constructor
declare destructor
end type
type TForm extends TFrame
declare virtual operator cast as any ptr
declare virtual sub Create
declare constructor
declare destructor
end type
operator TFrame.cast as any ptr
return @this
end operator
sub TFrame.Create
? "call Frame constructor"
end sub
constructor TFrame
Create
end constructor
destructor TFrame
? "call Frame destructor"
end destructor
operator TForm.cast as any ptr
return @this
end operator
sub TForm.Create
? "call Form constructor"
end sub
constructor TForm
Create
end constructor
destructor TForm
? "call Form destructor"
end destructor
''''''''''''''''
dim as TFrame Fr
dim as TForm F
sleep
type TObject extends object
declare abstract operator cast as any ptr
declare abstract sub Create
end type
type TFrame extends TObject
declare virtual operator cast as any ptr
'declare virtual sub Create
'declare constructor
declare destructor
end type
type TForm extends TFrame
declare virtual operator cast as any ptr
declare virtual sub Create
declare constructor
declare destructor
end type
operator TFrame.cast as any ptr
return @this
end operator
/'sub TFrame.Create
? "call Frame constructor"
end sub
constructor TFrame
Create
end constructor'/
destructor TFrame
? "call Frame destructor"
end destructor
operator TForm.cast as any ptr
return @this
end operator
sub TForm.Create
? "call Form constructor"
end sub
constructor TForm
Create
end constructor
destructor TForm
? "call Form destructor"
end destructor
''''''''''''''''
'dim as TFrame Fr
dim as TForm F
'ANONYMOUS CALLING OF F
dim as TFrame ptr FR=new TYPEOF(F)
sleep