CopyList()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
kpeters58
Enthusiast
Enthusiast
Posts: 341
Joined: Tue Nov 22, 2011 5:11 pm
Location: Kelowna, BC, Canada

CopyList()

Post by kpeters58 »

Today I would have liked for CopyList() to assume

Destination Structure = Source Structure

rather than telling me that Destination didn't have a structure
PB 5.73 on Windows 10 & OS X High Sierra
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Re: CopyList()

Post by GPI »

I don't understand your problem.
This:

Code: Select all

Structure test
  a.a
  b.b
EndStructure

NewList List1.test()
NewList List2.test()

AddElement(list1())
list1()\a=1
list1()\b=1

CopyList(list1(),list2())

ForEach list2()
  Debug Str(list2()\a)+" "+Str(list2()\b)
Next
works fine here (PB5.40b6)
CopyList doesn't create a list!
Post Reply