Foz wrote:I think the Declaration method though is very close to the "raw" way of doing things, (interface, structure, procedures, data section)
Maybe so. But then I'm glad I use SimpleOOP.
I have to adapt to the small changes in syntax when I come from coding in php, but at least it's generally the same style.
If it's the same in VB then I'm guessing that's kinda the accepted standard and the other pre-compilers fall out of line, because the authors thought PB couldn't handle it, or they themself, of they just didn't want to stray too far away from the pb syntax.
Anyway. Because of this I recommend SimpleOOP over the others to you, c4s
It's also very much like the Feature Request "Procedures inside Structures".
Only that instead of a structure you have a class (in the end it's still a structure with a prototype, ofcourse)
Feature requested in the other thread
Code: Select all
Structure myStructure
int.i
string.s
Procedure test()
Debug string
EndProcedure
EndStructure
Define var.myStructure
var\string = "Hello World"
var\test() ;Hello World
Actual Code with SimpleOOP
Code: Select all
Class MyClass
Public string.s ;Not sure whether public or define, doing this without simple oop right now.
Public Method test()
Debug This\string
EndMethod
EndClass
*Obj.MyClass = NewObject
*Obj\string = "Hello World"
*Obj\test() ;Hello World
Ofcourse normally the variable shouldn't be public. But this immitates the non-working code perfectly. And it works perfectly.