Page 1 of 1

1.01 : Pointer on list's element or Array's element

Posted: Wed Apr 08, 2015 8:42 pm
by Comtois
This code work fine with PureBasic, it dont work with SpiderBasic :

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 
idem :

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

Re: 1.01 : Pointer on list's element or Array's element

Posted: Sat Oct 21, 2017 7:46 am
by Fred
It's not supported in SpiderBasic