data structures in EU
- Posted by Allen V Robnett <alrobnett at alumni.princeton.edu> Mar 27, 2004
- 493 views
The ref manual states that "the exact layout of a data structure does not have to be declared in advance". But can I do so if it serves my purpose? I would like to declare a "record_layout" consisting of { "16_text_bytes", 4-byte_integer}. I will put a number into the first three bytes of the integer and do bit-fiddling with the 8 bits of the last byte. I would like to address the pieces individually and then move the structure as a whole (and vice-versa). I can see how to do this with offsets into a buffer allocated in RAM, but are there more direct methods provided by Euphoria? Allen