使用 Image 属性打印输出整数
Version = 有 2012 年(TC-1)
with Ada.Text_IO;
procedure Main is
type Some_Integer is range -42 .. 42;
X : Some_Integer := 17;
begin
Ada.Text_IO.Put_Line (X'Image);
end Main;
结果
17
with Ada.Text_IO;
procedure Main is
type Some_Integer is range -42 .. 42;
X : Some_Integer := 17;
begin
Ada.Text_IO.Put_Line (X'Image);
end Main;
17