How do I avoid the potential space in front of IntegerImage?
Use the function Trim from package Ada.Strings.Fixed (you can actually trim strings in many other useful ways): function My_Image (I : Integer) return String is begin — My_Image return Ada.Strings.Fixed.Trim (Integer’Image (I), Ada.Strings.Left); end My_Image; … My_Image (12) = “12” … In Ada 83, code a function that accepts a string and strips the leading blank: function Strip_Leading_Blank (Str : String) return String is begin — Strip_Leading_Blank if Str (Str’First) = ‘ ‘ then return Str (1+Str’First .. Str’Last); else return Str; end if; end Strip_Leading_Blank; … function My_Image (I : Integer) return String is begin — My_Image return Strip_Leading_Blank (Integer’Image (I)); end My_Image; … My_Image (12) = “12” …