使用屬性 Image 列印 Float
with Ada.Text_IO;
procedure Main is
X : Float := 2.71;
begin
Ada.Text_IO.Put_Line (Float'Image (X));
end Main;
結果
2.71000E+00
with Ada.Text_IO;
procedure Main is
X : Float := 2.71;
begin
Ada.Text_IO.Put_Line (Float'Image (X));
end Main;
2.71000E+00