On Jul 17, 1:49 am, "Alexander Camek" <Alexander.Ca...@[EMAIL PROTECTED]
>
wrote:
> Hi List,
>
> is there another way to convert a given String to an Integer or Float
typ=
e?
>
Perhaps you could use some part of the numeric IO packages I
constructed some years back:
http://www.dmitry-kazakov.de/ada/Numeric-Name-IO.htm
(Dmitry has kindly hosted the distribution of my contribution)
The packages Numeric_IO and Name_IO, together with their children and
sup****t, assist a program to read a user=92s input. The packages are
intended to sup****t numerical computation by providing =93Get=94 and
=93Put=
=94
procedures for floating numbers and for vectors and matrices of
floating numbers.
The procedures ease an end-user=92s burden in preparing inputs for
computational programs. The rules for input of floating numbers are
relaxed so that program inputs need not conform to the strict Ada
syntax for floating numbers. Facilities allow input either from files
or interactively. Consistent policies throughout all the services
allow programs to address input errors, to prompt the end-user
interactively or to specify optional default values.
Name-directed input can be used to read a file of input data, even
including physical units as defined by Dmitry's Measures_Edit.
Here are example lines from an input file that could be read by your
program that employs these packages:
Vect :=3D 1.414, 1.732, 2.0 ;
P :=3D 14.9 psi ; -- one standard atmosphere
--
John


|