I have the following task specification:
with Ada.Real_Time; use Ada.Real_Time;
package pkg_task is
task type task_t is
activationTime : constant Integer := 1;
period : constant Integer := 2;
computingTime : constant Integer := 1;
startingTime : Time;
end task_t;
end pkg_task;
When I compile I obtain the error mentioned on the title in all the lines of the task specification where I declare the variables, and I don't know what is the problem.
The interface to a task is its entries, so you only declare entries in a task specification. Any local variables in a task are declared in the declarative part of the task body.
A task without any entries is simply declared:
As Jacob wrote, you can't export anything that is not an entry in tasks. In this case, your task is really straightforward
In the body, you can then use your variables.
Anyway, it would be easier if you explained us what you're trying to do.