all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
23
Task/Singleton/PureBasic/singleton-2.purebasic
Normal file
23
Task/Singleton/PureBasic/singleton-2.purebasic
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