
-----------------------------------
Raknarg
Tue Apr 05, 2011 4:03 pm

Flexible arrays in Records
-----------------------------------
Whenever I try to put a flexible array in a record, it tells me "syntax error at 'flexible'". Is there a way to fix this?
This is essentially my code:


type thingy :
     record
          x : flexible array 1 .. 5 of int
     end record


-----------------------------------
Tony
Tue Apr 05, 2011 4:05 pm

RE:Flexible arrays in Records
-----------------------------------
a record's size (memory space) must be known at compile time. Since a flexible array could change that, that is not a valid syntax. You could have a pointer to a flexible array allocated elsewhere though.

-----------------------------------
Raknarg
Tue Apr 05, 2011 4:19 pm

RE:Flexible arrays in Records
-----------------------------------
Nah, thats fine, I'll just have it separate :/ thanks
