EUPHORIA struct support
- Posted by SDPringle Feb 02, 2011
- 2344 views
Forked from C Struct Support
Now that 4.0 is out, it's time to start thinking about...4.1! In fact, there is a wiki page with a high level overview of what's being planned:
One of the items on that list is for support for dealing with C-style structures in memory (not to be confused with data structures of native euphoria objects). Anyone who has dealt with an external API has probably needed to deal with these, managing offsets and data formats, peeking and poking...The goal is to make all of this easier for the euphoria programmer.
Matt
That's going to be really useful for interfacing with C libraries and most of them are written in C. To write the same thing in EUPHORIA for sequences we have to create an enumerated list of constants. Wouldn't it be good to have something similar for sequences?
struct sequence person integer magic sequence name sequence phone_numbers end struct person p1 p1.magic = "Person" p1.name = "Matt Lewis" p1.phone_numbers = {} -- The following prints -- Person -- Matt Lewis -- for i = 1 to length(p1) do ? p1[i] end for