使用 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