How to initialize a record with a list element in ada
10 November 2023 at 22:53
When trying to instantiate a list element in a record my program does not work.
I get the following error in the declaration of the subtype list_unbounded:
hear.adb:25:65: error: prefix must not be a generic package hear.adb:25:65: error: use package instantiation as prefix instead hear.adb:25:70: error: incorrect constraint for this kind of type gnatmake: "hear.adb" compilation error
Procedure hear is:
ind : Integer;
Subtype List_Unbounded is Ada.Containers.Doubly_Linked_Lists.List(ELement_Type => Ada.Strings.UNbounded.Unbounded_String);
Type T_Node is record
Name : Ada.Strings.Unbounded.UNbounded_String;
N_List : List_Unbounded;
end record;
begin
(...)