Being able to have a list within a UDT

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
two_bits
User
User
Posts: 15
Joined: Sat Oct 04, 2003 6:52 pm

Being able to have a list within a UDT

Post by two_bits »

Hi, I think it would be good if we could have a list inside of a user defined type, so something like the following would be valid.

Code: Select all

type order
    list items.item()
endtype

newlist orders.order ()
The syntax is probabally wrong but im sure you get the general idea.

Cheers
James
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Perhaps should be:

Code: Select all

NewList items.item()
Structure order
    items.item()
EndStructure

NewList orders.order ()
This should be very good. I missed that sometimes.
But i guess this is very difficult to implement, because the .order type would have a variable size, and it would have not sequential data in reserved memory for the .order defined variables... :(
Post Reply