Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
30
Task/Classes/PureBasic/classes-2.basic
Normal file
30
Task/Classes/PureBasic/classes-2.basic
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
Class Foo
|
||||
Private Value.i
|
||||
|
||||
BeginPublic
|
||||
Method Init()
|
||||
; Any needed code goes here
|
||||
EndMethod
|
||||
|
||||
Method Release()
|
||||
; Any code befoe freeing the object goes here
|
||||
EndMethod
|
||||
|
||||
Method Get()
|
||||
MethodReturn This\Value
|
||||
EndMethod
|
||||
|
||||
Method Set(n)
|
||||
This\Value = n
|
||||
EndMethod
|
||||
|
||||
Method.s ToString()
|
||||
MethodReturn Str(This\Value)
|
||||
EndMethod
|
||||
EndPublic
|
||||
EndClass
|
||||
|
||||
;- Test the code
|
||||
*Demo.foo = NewObject.foo()
|
||||
*Demo\Set(4)
|
||||
MessageRequester("Info", "Val= " + *Demo\ToString())
|
||||
Loading…
Add table
Add a link
Reference in a new issue