Reputation:
For example in c you could say have a condition and if that condition is not met you can return(0); and this would terminate the program.
Is there a way I could do this in Ada?
Upvotes: 2
Views: 668
Reputation: 11
if you can use GNAT, try GNAT.OS_Lib.OS_Exit(1);
this terminates the program with the given exit code.
However, if you want some finalisation try GNAT.OS_Lib.OS_Abort;
Upvotes: 0
Reputation: 75
In C you should call exit() function;
But investigating your work, i found some information about.
if some_condition then
Abort_Task (Current_Task);
end if;
Upvotes: 0