(11-12-2023, 06:05 AM)eoredson Wrote: So are you saying it can't be done or nobody wants to!?
Code: (Select All)
Type BitStruct
xbit As _Bit
End Type
Dim BitStructure As BitStruct
Why do you want an UDT variable as opposed to a variable which straight out declared ```AS _BIT```?
Not even C++ allows a "property" to occupy seven bits or less, let alone only one. I used "property" as term coming from OOP as synonym for "field". Although "bit fields" do exist they are for maniacs to handle.
As was already said around here many times before, if you need an array as UDT field member, make it type ```_MEM``` and use the statements and functions from that gang, that's what they are there for. It's clunky but to make it "prettier" than that, you will have to begin your bid today to transform QB64 into an object-oriented programming language.
You should know that you could also use a ```STRING * whatever``` variable and parse it, although it will be slow and it's a PITA sometimes working with FLS. The additional advantage of the "string list", though is that you could set whatever values of "array" elements you please, ie. mix the types, as long as you know how to program for what to look for.