Variable initialization in generic package body using return value of function
问题 In Ada, I have the following spec file: GENERIC TYPE Item IS PRIVATE; --type of array size : integer; --size of array PACKAGE gwar IS function get_size return integer; END gwar; And body file: with Ada.Text_Io; use Ada.Text_Io; package body gwar is --Get_Size allows the txt file to specify how much space to allocate. function get_size return Integer is Filename : String := "win.txt"; File : Ada.Text_IO.File_Type; Line_Count : Integer := 0; ReturnSize : Integer; begin Ada.Text_IO.Open(File =>