title: Ada left hand of assignment must not be limited type
body: <p>I am at loss after spending hours on this.</p>
  
  <p>Protected type declaration:</p>
  
  <pre><code>   protected type AdditionMachine is
        procedure setTask (Item : in WorkerTask);
        procedure getTask (Item : out WorkerTask);
        procedure calculate;
     private
        machineType : String (1 .. 1) := "A";
        job : workerTask;
     end AdditionMachine;
  </code></pre>
  
  <p>Task: </p>
  
  <pre><code>   task body SimpleTask1 is 
       Available     : Natural := ADDITION_MACHINES;
        Elements      : array (1 .. ADDITION_MACHINES) of AdditionMachine;
     begin
       loop
          select
             when Available &gt; 0 =&gt;
                accept getMachine (machine : out AdditionMachine) do
                    machine := Elements(Available);
                    Available := Available - 1;
                end getMachine;
          or
              accept addMachine (machine : in AdditionMachine) do
                   Available := Available + 1;
                   Elements(Available) := machine;
                end addMachine;
          end select;
       end loop;
     end  SimpleTask1;
  </code></pre>
  
  <p>At line <code>Elements(Available) := machine;</code> and <code>machine := Elements(Available);</code> I get "left hand of assingment must not be limited type"</p>
  
  <p>I have no idea how to fix this, I've found nothing when I googled, can anyone help?</p>
  
  <p>edit: I now know that protected types are limited, but how do I accomplish a pool of protected objects without something like above?</p>