[Implemented] CopyList(LinkedList(),LinkedList2()) and Alias

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

[Implemented] CopyList(LinkedList(),LinkedList2()) and Alias

Post by Joakim Christiansen »

CopyList(LinkedList(),LinkedList2())
Copy a linked list into another, the structure used must be the same.

EDIT:
And maybe something like a dynamic With would be cool!

Should be named Alias then:

Code: Select all

Select ListToUse
  Case 1: List1() Alias List()
  Case 2: List2() Alias List()
  Case 3: List3() Alias List()
EndSelect

AddElement(List())
List()\Blablabla = "OMG"
Last edited by Joakim Christiansen on Thu Apr 19, 2007 2:57 am, edited 1 time in total.
I like logic, hence I dislike humans but love computers.
WishMaster
Enthusiast
Enthusiast
Posts: 277
Joined: Fri Jun 17, 2005 7:13 pm
Location: Franconia
Contact:

Post by WishMaster »

I second this.
Image Image
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

I "third" that ;)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Never heard this expression... However,

I force... umm... "fourth" that, too... :lol:
PB 4.30

Code: Select all

onErrorGoto(?Fred)
User avatar
macros
User
User
Posts: 88
Joined: Wed Mar 15, 2006 1:47 pm
Location: Munich

Post by macros »

And I "fifth" it :D
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Post by Demivec »

I "sixth" it.:D

This would make possible a similiar structure equate such as: CopyStructVar(first.dataRecType,second.dataRecType) that could assign a structured variable's contents to a another variable with the same structure.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

Anyone know how to make a homemade?
I like logic, hence I dislike humans but love computers.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

And maybe something like a dynamic With would be cool!

Should be named Alias then:

Code: Select all

Select ListToUse
  Case 1: List1() Alias List()
  Case 2: List2() Alias List()
  Case 3: List3() Alias List()
EndSelect

AddElement(List())
List()\Blablabla = "OMG"
Hmm? :D Would sure make PB into the most sexy language!
I like logic, hence I dislike humans but love computers.
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

Joakim Christiansen wrote:And maybe something like a dynamic With would be cool!

Should be named Alias then:

Code: Select all

Select ListToUse
  Case 1: List1() Alias List()
  Case 2: List2() Alias List()
  Case 3: List3() Alias List()
EndSelect

AddElement(List())
List()\Blablabla = "OMG"
Hmm? :D Would sure make PB into the most sexy language!
i strongly second this request.

edit: CopyList() would be nice too. :)

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Post Reply