with Text_Io;
use Text_Io;
procedure Main is
type T_Char_Array is array (Positive range <> ) of Character;
function Recursive_Get_Char_Array(Tab : in T_Char_Array;
index : in Positive) return T_Char_Array is
New_Tab : T_Char_Array(Tab'Range) := Tab;
begin
if Index <= Tab'last then
Get_Immediate(New_tab(Index));
Put(New_tab(Index));
return Recursive_Get_Char_Array(New_Tab, Index+1);
else
return Tab;
end if;
end Recursive_Get_Char_Array;
Mon_Tab : T_Char_Array(1..10);
begin
Put("Entrez une texte de 10 caractères : " );
Put(Character'Val(10) & "Votre texte : " &
String(Recursive_Get_Char_Array(Mon_Tab, 1)));
end Main;