QB64Team / qb64

BASIC for the modern era.
https://www.qb64.org
Other
667 stars 94 forks source link

Array in User Type #5

Open QB64Bot opened 4 years ago

QB64Bot commented 4 years ago

Issue by Kobolticus Saturday Jul 14, 2018 at 16:02 GMT Originally opened as https://github.com/Galleondragon/qb64/issues/52


Requesting an enhancement for the User Types to have the ability to use an array inside the type Type Userdata Variables(50) AS INTEGER . . . end type

Dim MyType(20) as Userdata

MyType(1).Variables(15)=1024

ghost commented 4 years ago

I really like this idea. This would really help me with a program I have been working on.

ghost commented 3 years ago

You might not find this acceptable, but you can use a _MEM type variable in your UDT and you can use an array in that. Of course, you'd need to write a function to parse the array stored in memory to get it back. I've got a template of sorts for getting information stored in a _MEM array here: https://www.qb64.org/forum/index.php?topic=3762.0