'Static' statement question
Posted: Thu Dec 12, 2024 11:38 pm
I frequently use this syntax :Two specific procedures are ever added :I would like to compress all the methods of the same class, all in one single procedure.
If I test for only one instance, I have near nothing to do : I just replace Protected with Static.
Is Static a right directive to start any instances ?
Code: Select all
Procedure classMethodX(*this.class)
With *this
; ...
EndWith
EndProcedureCode: Select all
Procedure classCreate()
Protected *this.class
*this = AllocateMemory(SizeOf(class) )
ProcedureReturn *this
EndProcedure
Procedure classDestroy(*this.class)
FreeMemory(*this)
EndProcedureIf I test for only one instance, I have near nothing to do : I just replace Protected with Static.
Is Static a right directive to start any instances ?