> On 8 May 2019, at 9:25 am, Mark Wieder via use-livecode > <use-livecode@lists.runrev.com> wrote: > > On 5/7/19 4:06 PM, Monte Goulding via use-livecode wrote: >>> On 8 May 2019, at 2:36 am, Mark Wieder via use-livecode >>> <use-livecode@lists.runrev.com> wrote: >>> >>> is just too unreadable, unmaintainable, and error-prone to deal with. >> Yes it would probably be helpful to be able to write `h1024` and have it >> convert to and from a CArray type which could have an element type property >> (in this case UInt8) and a length property (1024) and bridge to a list of >> the element type and syntax to move to and from Data if necessary. > > I'd prefer 1024h, but I'm good with either. I've rant^H^H^Hsuggested this > several times, but it hasn't gone anywhere.
I’m not really sure if the aggregate type is intended to be a stopgap solution so perhaps if it is that may be a good reason not to spend too much time handling cases like this and figuring out how best to handle unions etc. You can do what you need to do it’s just not a huge amount of fun when dealing with complex structs. Ideally we would have a foreign record type where you could specify member names and there would be syntax to support unions so they aren't so tricky to handle and the engine can figure out padding if union members are different sizes etc. Cheers Monte _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode