From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,adf94948991d0e26 X-Google-Attributes: gid103376,public From: rodemann@mathematik.uni-ulm.de (Joerg Rodemann) Subject: Re: Types Converting Date: 1996/04/27 Message-ID: <4ltn0h$c37@rigel.rz.uni-ulm.de>#1/1 X-Deja-AN: 151764791 distribution: world references: <4os0iCAqCegxEwYz@dhaheri.demon.co.uk> organization: University of Ulm, SAI, Germany newsgroups: comp.lang.ada Date: 1996-04-27T00:00:00+00:00 List-Id: HSR Al-Dhaheri (hashem@dhaheri.demon.co.uk) wrote: > Hi, > I would like to know how can you convert an integer to a string in Ada. > For example, if you've declared a variable of type integer called > [Total] which holds 25, and another one as a string called [Message] > which holds "The Total is ## out of 100". > How can you convert the [Total] to a string to insert it in the string > [Message] in the position '##' so that the [Message] will contain "The > Total is 25 out of 100" as the final result? Hello! The easiest solution is: Message : String; Message := "The Total is " & i'Image & " out of 100"; Have a nice day George -- Joerg 'George' Rodemann Erhard-Groezinger-Strasse 82 Department of Physics D-89134 Blaustein University of Ulm Tel. (0731) 553319 e-mail: rodemann@mathematik.uni-ulm.de