comp.lang.ada
 help / color / mirror / Atom feed
* converting strings to floats/integers
@ 1998-08-26  0:00 mrpinga
  1998-08-26  0:00 ` daniel gaudry
  0 siblings, 1 reply; 2+ messages in thread
From: mrpinga @ 1998-08-26  0:00 UTC (permalink / raw)


apologies if this message gets posted more than once

can anyone tell me how i can get mystring := "4.56" to become myfloat := 4.56
or mystring := "123" to become myinteger := 123

any information would be greatly appreciated...

please EMAIL me as i dont have a proper usenet connection

Jared

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum




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

* Re: converting strings to floats/integers
  1998-08-26  0:00 converting strings to floats/integers mrpinga
@ 1998-08-26  0:00 ` daniel gaudry
  0 siblings, 0 replies; 2+ messages in thread
From: daniel gaudry @ 1998-08-26  0:00 UTC (permalink / raw)


it easy if you know how

that's the manual

27 procedure Get(From : in String; Item : out Num; Last : out Positive);

28 Reads a real value from the beginning of the given string, following the
same rule as the Get procedure that reads a real value from a file, but
treating the end of the string as a file terminator. Returns, in the
parameter Item, the value of type Num that corresponds to the sequence
input. Returns in Last the index value such that From(Last) is the last
character read.
 here is an example
s : string (1..10) := "1.20      ";
f : float
l : integer;

 begin
Get(From => s;,
Item => f,
 Last => l);






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

end of thread, other threads:[~1998-08-26  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-26  0:00 converting strings to floats/integers mrpinga
1998-08-26  0:00 ` daniel gaudry

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