comp.lang.ada
 help / color / mirror / Atom feed
From: Ludovic Brenta <ludovic.brenta@insalien.org>
Subject: Re: Simple library functions
Date: 12 Feb 2004 21:54:07 +0100
Date: 2004-02-12T21:54:07+01:00	[thread overview]
Message-ID: <m3n07o3tow.fsf@insalien.org> (raw)
In-Reply-To: 19401efb.0402121137.2a20b681@posting.google.com

scallassig@mailexpire.com (Harald Korneliussen) writes:

> I have been trying to solve some programming excercises from
> www.topcoder.com in Ada, just to compare it to Java and the other
> popular languages.
> 
> One problem I keep running into is the lack of common, useful
> utilities in the libraries that come with Gnat & Ada. One thing is
> that I had to write my own tokenizer. That gave me the opporunity to
> emulate the String.split() method in newer versions of Java, OK*. But
> now I have to do an even simpler task, converting a string of digits
> to an integer, and as far as I can see there is no function for this
> in the standard libraries!?

Look at Integer'Value in the reference manual 3.5 (52).  Example:

N : Integer := Integer'Value ("42");

> I hear there is a new revision of Ada coming. I really, really hope
> they adress the lack of a standard library of utillity packages
> instead of adding new language features.

The small size of the Ada standard library has been much debated here.
This does not mean that there are no libraries at all; I encourage you
to look at http://www.adaworld.com, http://www.adaic.com,
http://www.adapower.com, and http://libre.act-europe.fr.  These sites
list several Ada libraries which you may find useful.

> * Anyone want it? :-)

If you write some useful utilities that you are willing to share, I
think it would be a good idea to add them to one of these libraries
and join in the development.  As for your tokenizer, is it very
different from OpenToken?

-- 
Ludovic Brenta.



  parent reply	other threads:[~2004-02-12 20:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-12 19:37 Simple library functions Harald Korneliussen
2004-02-12 19:50 ` Ed Falis
2004-02-12 19:54 ` Ed Falis
2004-02-12 20:54 ` Ludovic Brenta [this message]
2004-02-13  0:52 ` Jeffrey Carter
2004-02-13  7:18   ` Harald Korneliussen
2004-02-13 12:54     ` Harald Korneliussen
2004-02-13 21:36       ` Randy Brukardt
2004-02-13 21:55     ` Pascal Obry
2004-02-14 16:14       ` Harald Korneliussen
2004-02-13  1:21 ` Stephen Leake
replies disabled

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