I'm new in Ada and unfortunately i got stuck on a problem. Here is my code:
with Ada.Text_Io;
with Ada.Integer_Text_Io;
--use Ada.Text_Io;
--use Ada.Integer_Text_Io;
procedure life is
type Plansza is array (Integer range <>, Integer range <>) of Integer;
File : Ada.Text_IO.File_Type;
tab : Plansza(1..4,1..4);
Filename : String := "plansza.txt";
begin
Ada.Text_IO.Open (File => File, Mode => Ada.Text_IO.In_File, Name => Filename);
for x in 1..4 loop
for y in 1..4 loop
Ada.Text_IO.Get ( File => File, Item => Plansza(x,y) );
end loop;
end loop;
for x in 1..4 loop
for y in 1..4 loop
Ada.Text_IO.Put (Item => Plansza(x,y));
end loop;
New_Line;
end loop;
end life;
End this is what i get:
life.adb:14:17: "Set_Output" is not visible
life.adb:14:17: non-visible declaration at a-textio.ads:114
life.adb:18:44: no candidate interpretations match the actuals:
life.adb:18:73: argument of type conversion must be single expression
life.adb:18:73: ==> in call to "Get" at a-textio.ads:239
life.adb:18:73: ==> in call to "Get" at a-textio.ads:205
life.adb:23:44: no candidate interpretations match the actuals:
life.adb:23:44: missing argument for parameter "File" in call to "put" declared at a-textio.ads:241
life.adb:23:44: missing argument for parameter "File" in call to "put" declared at a-textio.ads:207
life.adb:23:58: argument of type conversion must be single expression
life.adb:23:58: ==> in call to "Put" at a-textio.ads:242
life.adb:23:58: ==> in call to "Put" at a-textio.ads:208
life.adb:25:25: "New_Line" is not visible
life.adb:25:25: non-visible declaration at a-textio.ads:166
life.adb:25:25: non-visible declaration at a-textio.ads:165
gnatmake: "life.adb" compilation error
I don't know where this errors come from, especially one "non-visible declaration at a-textio.ads", by these about parameters also.