--  Program_Exit and Exit_Cases (G7): Finish exits the whole program when Code is not 0,
--  having set Done, which the main program's Program_Exit condition says.
package Finishing with SPARK_Mode is
   Done : Boolean := False;
   --  exits the program with Code when it is not 0, having set Done
   procedure Finish (Code : Integer)
     with Global => (In_Out => Done),
          Program_Exit => Done,
          Exit_Cases => (Code /= 0 => Program_Exit, others => Normal_Return);
end Finishing;
