fb:porticula NoPaste
Statische Variable in UDTs - Trick
Uploader: | MOD |
Datum/Zeit: | 03.06.2010 01:37:43 |
Type foo
bla As Integer Ptr
Declare Constructor
Declare Property bar As Integer
Declare Property bar (ByRef x As Integer)
End Type
Constructor foo
bar = 0
End Constructor
Property foo.bar As Integer
Return *bla
End Property
Property foo.bar (ByRef x As Integer)
Static As Integer temp
temp = x
bla = @temp
End Property
Dim As foo v1, v2
v1.bar = 5
v2.bar = 7
Print v1.bar
Print v2.bar
Sleep