Closed vendethiel closed 2 years ago
https://learn.adacore.com/courses/intro-to-ada/chapters/arrays.html#restrictions
procedure Indefinite_Subtypes is
function Get_Number return Integer is
begin
return Integer'Value (Get_Line);
end Get_Number;
A : String := "Hello";
-- Indefinite subtype
B : String (1 .. 5) := "Hello";
-- Definite subtype
C : String (1 .. Get_Number);
-- Indefinite subtype
-- (Get_Number's value is computed at
-- run-time)
begin
null;
end Indefinite_Subtypes;
https://learn.adacore.com/courses/intro-to-ada/chapters/arrays.html