Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ada > Re: Converting ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 6 Topic 5814 of 5874
Post > Topic >>

Re: Converting Integer / Float to String

by JPWoodruff@[EMAIL PROTECTED] Jul 19, 2008 at 05:28 PM

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
 




 6 Posts in Topic:
Converting Integer / Float to String
"Alexander Camek&quo  2008-07-17 09:49:16 
Re: Converting Integer / Float to String
anon@[EMAIL PROTECTED] (  2008-07-17 08:05:02 
Re: Converting Integer / Float to String
"Dmitry A. Kazakov&q  2008-07-17 10:15:30 
Re: Converting Integer / Float to String
"Alexander Camek&quo  2008-07-17 10:32:59 
Re: Converting Integer / Float to String
"Dmitry A. Kazakov&q  2008-07-17 11:24:51 
Re: Converting Integer / Float to String
JPWoodruff@[EMAIL PROTECT  2008-07-19 17:28:07 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 27 20:49:20 CDT 2008.