When defining an Interface, the compiler does not accept a method returning the same interface. It says "a Procedure can't return a Structure".
But an instanciated Interface is a pointer.
Of course we can work around by declaring de method returning a 'i'. But this way we can't chain methods calls, the compiler won't recognize those and will generate an error.
For instance :
Code: Select all
; with:
Interface MyClass
DoSomething.MyClass()
DoSomethingElse.MyClass()
EndInterface
oC.MyClass = New_MyClass() ; granted you've created this Procedure to create the instance.
; then we could do something like that:
oC\DoSomething()\DoSomethingElse()
; instead of
oC\DoSomething()
oC\DoSomethingElse()
Cheers,
Guy.