comp.lang.ada
 help / color / mirror / Atom feed
From: john.mccabe@emrad.com.nospam (John McCabe)
Subject: Re: Text IO
Date: Wed, 29 Aug 2001 08:50:51 GMT
Date: 2001-08-29T08:50:51+00:00	[thread overview]
Message-ID: <3b8cac5b.3843987@news.demon.co.uk> (raw)
In-Reply-To: ab21b49a.0108280819.7483865c@posting.google.com

On 28 Aug 2001 09:19:31 -0700, mraikes@vt.edu (Matt Raikes) wrote:

>I was wondering how to convert integers and floats to strings for
>output to text files...someone already suggested the following:
>
>For convert Integers to/from Strings check out the
>attributes 'Image (to) and 'Value (from)
>
>I couldn't get this to work though.  Any other ideas??

Depends on what you're trying to do. If you're trying to assign them
to a string it is awkward to use 'Image. Perhaps you should look at
the Reference Manual, particularly the section of Integer_IO (or
Integer_Text_IO) that defines the operations Get and Put, where the
first parameter name is "To". These operations allow you to have full
control over the representation of the output data and store it into a
string, similar to sprintf in C.

The 'Image and 'Value attribute results are, I believe, implementation
dependant.


Best Regards
John McCabe



  parent reply	other threads:[~2001-08-29  8:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-28 16:19 Text IO Matt Raikes
2001-08-28 16:28 ` martin.m.dowie
2001-08-28 16:47 ` Marin David Condic
2001-08-28 18:33 ` Ted Dennison
2001-08-29  8:50 ` John McCabe [this message]
2001-09-01  1:15   ` Robert Dewar
2001-09-03  8:23     ` John McCabe
2001-09-03 11:11       ` David C. Hoos, Sr.
2001-09-03 12:05         ` John McCabe
  -- strict thread matches above, loose matches on Subject: below --
1995-04-22  0:00 Chris O'Regan
1995-04-22  0:00 ` Tore Joergensen
1988-05-11 16:46 TEXT_IO Marcus Moehrmann
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox