fork download
  1. with Ada.Text_IO; use Ada.Text_IO;
  2.  
  3. procedure Print_Hex is
  4. subtype Count is Integer range -1_000_000 .. 1_000_000;
  5.  
  6. package Count_IO is new Integer_IO (Count);
  7. X : Count;
  8. begin
  9. Count_IO.Default_Width := 1;
  10. Count_IO.Default_Base := 16;
  11.  
  12. X := Count'First;
  13. while X < Count'Last loop
  14. Count_IO.Put (X);
  15. New_Line;
  16.  
  17. X := X + 500_000;
  18. end loop;
  19. end Print_Hex;--- Route 66
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
-16#F4240#
-16#7A120#
16#0#
16#7A120#