[Gambas-user] module or class?
    Jean-Yves F. Barbier 
    12ukwn at ...626...
       
    Tue Nov  3 19:22:00 CET 2009
    
    
  
Fabien Bodard a écrit :
> the difference is simple
> 
> a classe must be instanciate before to be called
> 
> 
> dim hClass as new MyClass
> 
> hClass.Procedure
> 
> 
> 
> ------
> 
> A module is static :
> 
> Module.Proc
> 
> 
> 
> But in gambas you can call class proc like with a module if this class is static
> 
> 'Gambas class
> 
> CREATE STATIC
> 
> Public Sub MyProc
> 
> End
> 
> 
> -----
> 
> the call:
> 
> MyClass.MyProc
> 
> 
> 
> So generally we use Module for generic Procedure, and Class for object
> 
> 
> 'Class YesMen
> 
> 
> 
> Public Sub ShakeHand()
> End
> 
> Public Sub Walk()
> End
> 
> 
> 
> so :
> 
> Dim Fabien as new YesMen
> 
> Fabien.ShakeHand
> Fabien.Walk
> 
> Look about the object oriented progammation
> 
> POO
Ok, thanks Fabien, this clear
JY
-- 
Troubled day for virgins over 16 who are beautiful and wealthy and live
in eucalyptus trees.
    
    
More information about the User
mailing list