comp.lang.ada
 help / color / mirror / Atom feed
* Re: Convertion of string to float
  2000-11-14  0:00 Convertion of string to float jordan
@ 2000-11-14  0:00 ` Robert A Duff
  2000-11-18  0:00   ` Peter McMorran
  0 siblings, 1 reply; 3+ messages in thread
From: Robert A Duff @ 2000-11-14  0:00 UTC (permalink / raw)


jordan <huikeith@hotmail.com> writes:

> How can i convert an array of character to integer???
> Or
> How can i convert a string to float???
> (The case is that i get a string from the terminal, and i need to make
> part of it as a float number, how can i do??)

Look up the Image and Value attributes.

- Bob




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Convertion of string to float
@ 2000-11-14  0:00 jordan
  2000-11-14  0:00 ` Robert A Duff
  0 siblings, 1 reply; 3+ messages in thread
From: jordan @ 2000-11-14  0:00 UTC (permalink / raw)


Dear all,

How can i convert an array of character to integer???
Or
How can i convert a string to float???
(The case is that i get a string from the terminal, and i need to make
part of it as a float number, how can i do??)

Thanks for reply






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Convertion of string to float
  2000-11-14  0:00 ` Robert A Duff
@ 2000-11-18  0:00   ` Peter McMorran
  0 siblings, 0 replies; 3+ messages in thread
From: Peter McMorran @ 2000-11-18  0:00 UTC (permalink / raw)


In <wccvgtqwqu2.fsf@world.std.com>, on 11/14/00 
   at 02:50 PM, Robert A Duff <bobduff@world.std.com> said:

>jordan <huikeith@hotmail.com> writes:

>> How can i convert an array of character to integer???
>> Or
>> How can i convert a string to float???
>> (The case is that i get a string from the terminal, and i need to make
>> part of it as a float number, how can i do??)

>Look up the Image and Value attributes.

Or use Float_IO.Get from Text_IO. One version of get takes a
string as input. You need to instance Float_IO for the type you
want to read, i.e. float. This gives you a clearly-defined
exception interface, in case the string is badly formatted.

Cheers,
Peter

-- 
-----------------------------------------------------------
mcmorran@visi.net (Peter McMorran)
-----------------------------------------------------------





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-11-18  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-14  0:00 Convertion of string to float jordan
2000-11-14  0:00 ` Robert A Duff
2000-11-18  0:00   ` Peter McMorran

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