[Gambas-user] Class Constructor private var questions

nando nando_f at ...951...
Mon Feb 13 05:53:39 CET 2012


I wanted to verify that..


example:
I have a class called 'X' with a private variable


PRIVATE my_int AS INTEGER = -14


PUBLIC SUB _NEW()    '===constructor===

    my_int = -15

END


Questions:
1) The =-14 act as a constructor automatically for a _NEW instantiation?
2) The =-15 occur as a manual explicit contructor...and is unnecessary?
3) The _NEW() executes after the =-14 is assigned to the new private?




More information about the User mailing list