From: Jerry <lanceboyle@qwest.net>
Subject: Re: Does ada have a sscanf equivalent?
Date: Mon, 22 Feb 2010 15:11:21 -0800 (PST)
Date: 2010-02-22T15:11:21-08:00 [thread overview]
Message-ID: <8432d8b0-acd0-439f-8366-d72f53571f90@k18g2000prf.googlegroups.com> (raw)
In-Reply-To: e00ef618-4980-45fb-aa35-52c513fe178a@b5g2000prd.googlegroups.com
On Feb 22, 12:48 pm, jpwoodruff <jpwoodr...@gmail.com> wrote:
> On Feb 22, 1:08 am, "J.s" <justin.squi...@gmail.com> wrote:
>
> > I am trying to translate some C code that parses a string into numbers
> > (both Integers and Floats) from an input file. Would it be easiest to
> > just import the C function or is there an Ada equivalent?
>
> Let me offer a product of my own devising.
>
> "The packages Numeric_IO and Name_IO, together with their children and
> support, assist a program to read a user’s input. The packages are
> intended to support numerical computation by providing Get and Put
> procedures for floating numbers and for vectors and matrices of
> floating numbers.
>
> "The procedures ease an end-user’s 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."
>
> Dmitry has been kind enough to make it available.
>
> http://www.dmitry-kazakov.de/ada/Numeric-Name-IO
>
> --
> John
This looks pretty cool. But it doesn't seem to use the Ada 2005
definitions for matrices and vectors. I haven't looked at the code but
I wonder how hard it would be to create such a version. I would think
it should be pretty easy.
Jerry
next prev parent reply other threads:[~2010-02-22 23:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-22 9:08 Does ada have a sscanf equivalent? J.s
2010-02-22 10:24 ` Georg Bauhaus
2010-02-22 10:42 ` Jacob Sparre Andersen
2010-02-22 15:38 ` J.s
2010-02-22 19:48 ` jpwoodruff
2010-02-22 23:11 ` Jerry [this message]
2010-02-23 2:11 ` jpwoodruff
2010-02-23 9:36 ` Conversion from Ada95 to Ada05 (Was: Does ada have a sscanf equivalent?) stefan-lucks
2010-02-23 19:48 ` Randy Brukardt
2010-02-23 21:12 ` Conversion from Ada95 to Ada05 Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox