I am trying to create an array that stores 3 dynamically allocated arrays of floats. When I try to allocate the three arrays later in my program, the compiler tells me it was expecting "Float_Array", but "found type access to subtype of "Float_Array"". I am not sure if this issue comes from me using a pointer here or if it is because I am creating an array containing a dynamic array.
Here are my array definitions:
type Float_Array is array (Integer range <>) of Float;
type Triangle_Array is array (0..2) of Float_Array;
type Triangle_Array_Ptr is access Triangle_Array;
This is the code that is causing issues:
V(0) := new Float_Array(0..Size-1);
V(1) := new Float_Array(0..Size-1);
V(2) := new Float_Array(0..Size-1);
Edit: V is a Triangle_Array_Ptr Thank you Zerte for the clarification on line 2 of my code, I didn't realize that was a rule for arrays. Is there a different way to contain three dynamic Float_Arrays? If not I can just create three independent Float_Arrays and pass them to each method.