1.01 : Pointer on list's element or Array's element
Posted: Wed Apr 08, 2015 8:42 pm
This code work fine with PureBasic, it dont work with SpiderBasic :
idem :
Code: Select all
Structure astruct
a.w
b.l
c.w
EndStructure
Procedure SetB(*myptr.Long)
*myptr\l = 9
EndProcedure
NewList MyList.astruct()
AddElement(MyList())
MyList()\b = 45
ForEach MyList()
SetB(@MyList()\b)
Debug MyList()\b
Next
Code: Select all
Structure astruct
a.w
b.l
c.w
EndStructure
Procedure SetB(*myptr.Long)
*myptr\l = 9
EndProcedure
Dim MyList.astruct(2)
MyList(1)\b = 45
SetB(@MyList(1)\b)
Debug MyList(1)\b