Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
23
Task/Singleton/PureBasic/singleton-2.basic
Normal file
23
Task/Singleton/PureBasic/singleton-2.basic
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
Singleton Class Demo
|
||||
BeginPrivate
|
||||
Name$
|
||||
X.i
|
||||
EndPrivate
|
||||
|
||||
Public Method Init(Name$)
|
||||
This\Name$ = Name$
|
||||
EndMethod
|
||||
|
||||
Public Method GetX()
|
||||
MethodReturn This\X
|
||||
EndMethod
|
||||
|
||||
Public Method SetX(n)
|
||||
This\X = n
|
||||
EndMethod
|
||||
|
||||
Public Method Hello()
|
||||
MessageRequester("Hello!", "I'm "+This\Name$)
|
||||
EndMethod
|
||||
|
||||
EndClass
|
||||
Loading…
Add table
Add a link
Reference in a new issue