From: rodemann@mathematik.uni-ulm.de (Joerg Rodemann)
Subject: Re: Types Converting
Date: 1996/04/27
Date: 1996-04-27T00:00:00+00:00 [thread overview]
Message-ID: <4ltn0h$c37@rigel.rz.uni-ulm.de> (raw)
In-Reply-To: 4os0iCAqCegxEwYz@dhaheri.demon.co.uk
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
next prev parent reply other threads:[~1996-04-27 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-27 0:00 Types Converting HSR Al-Dhaheri
1996-04-27 0:00 ` Joerg Rodemann [this message]
1996-04-27 0:00 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox