Got an idea for enhancing PureBasic? New command(s) you'd like to see?
ZeHa
User
Posts: 38 Joined: Sun Apr 24, 2005 11:39 pm
Post
by ZeHa » Thu Jan 10, 2008 10:42 am
Hello,
I think it would be essential to be able to do something like this:
Code: Select all
Structure Player
xPos.l
yPos.l
NewList weapons.Weapon() ; <-- look here :)
EndStructure
There are a few workarounds like creating your own lists and so on, but I think this should be a native feature of PB.
Would this be possible for 4.2 or 4.3?
Kiffi
Addict
Posts: 1485 Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9
Post
by Kiffi » Thu Jan 10, 2008 12:20 pm
A good idea! I second this!
Greetings ... Kiffi
Hygge
milan1612
Addict
Posts: 894 Joined: Thu Apr 05, 2007 12:15 am
Location: Nuremberg, Germany
Contact:
Post
by milan1612 » Thu Jan 10, 2008 12:36 pm
Would be veeery handy
Windows 7 & PureBasic 4.4
Dare
Addict
Posts: 1965 Joined: Mon May 29, 2006 1:01 am
Location: Outback
Post
by Dare » Thu Jan 10, 2008 12:58 pm
Nice and powerful addition.
+1
Dare2 cut down to size
JCV
Enthusiast
Posts: 580 Joined: Fri Jun 30, 2006 4:30 pm
Location: Philippines
Post
by JCV » Thu Jan 10, 2008 1:13 pm
+1
That would be nice!
[Registered PB User since 2006]
[PureBasic 6.20][SpiderBasic 2.2]
[RP4 x64][Win 11 x64][Ubuntu x64]
#NULL
Addict
Posts: 1497 Joined: Thu Aug 30, 2007 11:54 pm
Location: right here
Post
by #NULL » Thu Jan 10, 2008 1:22 pm
yeah
, would spare me my barely working amateur tree list stuff
Hurga
Enthusiast
Posts: 148 Joined: Thu Jul 17, 2003 2:53 pm
Contact:
Post
by Hurga » Fri Jan 11, 2008 10:24 am
I agree
+1
Demivec
Addict
Posts: 4260 Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA
Post
by Demivec » Fri Jan 11, 2008 5:52 pm
+1
DarkDragon
Addict
Posts: 2344 Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:
Post
by DarkDragon » Fri Jan 11, 2008 5:56 pm
++
bye,
Daniel
Hroudtwolf
Addict
Posts: 803 Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:
Post
by Hroudtwolf » Fri Jan 11, 2008 7:13 pm
I disagree.
A dynamic linkedlist lib would be more important.
Code: Select all
Structure tProps
sName.s
sAssoc.s
EndStructure
Structure tMyData
sName.s
sEmail.s
*Properties.tProps
EndStructure
*List.tMyData = NewList
AddElement (*List)
*List\sName = "Frédéric Laboureur"
*List\sEmail = "support [at] purebasic.com"
; With dynamic instanced LinkedList, you could do that.
*List\Properties = NewList
AddElement (*List\Properties)
*List\Properties\sName = "talent"
*List\Properties\sAssoc = "Developed a realy cool programming language."
Best regards
Wolf
IceSoft
Addict
Posts: 1682 Joined: Thu Jun 24, 2004 8:51 am
Location: Germany
Post
by IceSoft » Fri Jan 11, 2008 7:17 pm
Why not both?
Belive! C++ version of Puzzle of Mystralia
<Wrapper>4PB, PB<game>, =QONK=, PetriDish, Movie2Image, PictureManager,...
Hroudtwolf
Addict
Posts: 803 Joined: Sat Feb 12, 2005 3:35 am
Location: Germany(Hessen)
Contact:
Post
by Hroudtwolf » Fri Jan 11, 2008 7:44 pm
LinkedList in structures would make necessary to change the syntax of purebasic.
That could be a new source of bugs. *paranoia*
Best regards
Wolf
Berikco
Administrator
Posts: 1326 Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:
Post
by Berikco » Fri Jan 11, 2008 8:12 pm
-6
ZeHa
User
Posts: 38 Joined: Sun Apr 24, 2005 11:39 pm
Post
by ZeHa » Sat Jan 12, 2008 12:45 am
@ Hroudtwolf: Why would the syntax change?!
I think it's totally important to have this. Otherwise, you can only have global lists and not bind them to an object. What do you do when you want to have a linked list for every new object you create? Let's say you've got a structure for a "person", and the person should be able to carry an arbitrary amount of stuff in his pockets. How would you do that? You can only use fixed-length arrays inside a structure.