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

Just starting out? Need help? Post your questions and find answers here.
Comtois
Posts: 40
Joined: Mon Feb 24, 2014 11:07 pm

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

Post 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
Fred
Site Admin
Posts: 1506
Joined: Mon Feb 24, 2014 10:51 am

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

Post by Fred »

It's not supported in SpiderBasic
Post Reply