ada Print out float using the Image attribute


Example

Ada 2012(TC-1)
with Ada.Text_IO;

procedure Main is
   type Some_Float digits 8 range 0.0 .. 10.0;
   X : Some_Float := 2.71;
begin
   Ada.Text_IO.Put_Line (X'Image);
end Main;

Result

2.71000E+00