From: Armin <ArminSchmidle@swol.de>
Subject: armin.schmidle@chnet.mail.abb.com
Date: 1998/09/05
Date: 1998-09-05T00:00:00+00:00 [thread overview]
Message-ID: <35F15654.D096F0AC@swol.de> (raw)
Question:
---------
can anyone tell me how i can get mystring := "4.56" to become myfloat :=
4.56
or mystring := "123" to become myinteger := 123
Answer:
--------
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);
next reply other threads:[~1998-09-05 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-05 0:00 Armin [this message]
1998-09-05 0:00 ` armin.schmidle@chnet.mail.abb.com Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox