Convert unbounded string to integer Ada
问题 My question is rather simple, as Google has let me down. How do I convert an unbounded string to an integer? If the string was bounded, I could do this: I : Integer := Integer'Value("613"); However, my string is unbounded, and Ada throws this error: expected type "Standard.String" found private type "Ada.Strings.Unbounded.Unbounded_String" Is what I want to do possible? 回答1: You just have to do the intermediate conversion: I : Integer := Integer'Value (To_String (T)); Here is a full test