title: Ada Reading a line of characters from a file and storing them in an array
body: <p>I want to store each block of characters that are seperated by a space at a specified index in my array. Here is my code:</p>
  
  <pre><code>with Ada.Text_IO; use Ada.Text_IO;
  
  procedure Test_Read is
  
      Input_File    : File_Type;
      type Arr_Type is array (Integer range &lt;&gt;) of Character;
      Arr :   Arr_Type (1 .. 3);
  
  begin
  
     Ada.Text_IO.Open (File =&gt; Input_File, Mode =&gt; Ada.Text_IO.In_File, Name =&gt; "input.txt");
  
      while not End_OF_File (Input_File) loop
          Ada.Text_IO.Get (File =&gt; Input_File, Item =&gt; Arr(1));
          Ada.Text_IO.Put (Item =&gt; Arr(1));
      end loop;
  
   Ada.Text_IO.Close (File =&gt; Input_File); 
  
  end Test_Read;
  </code></pre>
  
  <p>The file "input.txt" contains:</p>
  
  <pre><code>ABCD EFGH IJK
  </code></pre>
  
  <p>The ouput I get for Put(Arr(1)) is the full line:</p>
  
  <pre><code>ABCD EFGH IJK
  </code></pre>
  
  <p>The output I want for Put(Arr(1)) is:</p>
  
  <pre><code>ABCD
  </code></pre>