The problem is that you fiddled with the length of the array after creating it. Do not do that.
Instead
DECLARE Line : String := Ada.Text_IO.Get_Line(Input); StrippedLine : String := line; BEGIN StrippedLine := Strip(Line, "-");
Just initialize Stripped_Line right to the size you want when you declare it.
DECLARE Line : String := Ada.Text_IO.Get_Line(Input); StrippedLine : String := Strip(Line, "-"); BEGIN
I assume your strip function is working correctly here.
source share