From: Jeffrey Carter <spam@spam.com>
Subject: Re: pointer
Date: Wed, 31 Aug 2005 11:52:19 -0700
Date: 2005-08-31T11:52:19-07:00 [thread overview]
Message-ID: <E%mRe.8$S97.2@dfw-service2.ext.ray.com> (raw)
In-Reply-To: <TolRe.41184$F23.482144@twister2.libero.it>
TC wrote:
> How translate this c code?
It depends on what you mean by "translate". One could write C-in-Ada
that would be just like this, with all the opportunities for error that
implies.
However, it looks as if you're implementing a linked list with a record
as its data. To do that it's probably best to use the list component of
the standard data-structure library that will be part of Ada 0X. If you
can't do that, because you don't have an Ada-0X compiler, you can find
list components in most of the many fine Ada data-structure libraries
that are available on the web. I recommend the PragmAda Reusable
Components, but I may be biased.
Looking more closely, this appears to be part of a word-counting
program, and so probably homework. If you're doing word counting, you
probably want something that allows O(log N) (or better) insertions and
lookup, such as a map component from Ada.Containers (Ada 0X), or the
skip list from the PragmARCs.
--
Jeffrey Carter
"Now go away or I shall taunt you a second time."
Monty Python and the Holy Grail
E-mail: jeffrey_r_carter-nr [commercial-at]
raytheon [period | full stop] com
next prev parent reply other threads:[~2005-08-31 18:52 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-31 17:02 pointer TC
2005-08-31 18:40 ` pointer Martin Krischik
2005-08-31 18:52 ` Jeffrey Carter [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-05-19 9:38 Pointer Sébastien
2008-05-19 9:53 ` Pointer Dmitry A. Kazakov
2008-05-19 9:54 ` Pointer Dmitry A. Kazakov
2008-05-19 10:13 ` Pointer Sébastien
2008-05-19 10:32 ` Pointer Dmitry A. Kazakov
2008-05-19 10:34 ` Pointer Ludovic Brenta
2008-05-19 11:31 ` Pointer Sébastien
2008-05-19 12:09 ` Pointer Ludovic Brenta
2008-05-19 12:09 ` Pointer Dmitry A. Kazakov
2008-05-19 12:47 ` Pointer Sébastien
2008-05-19 16:25 ` Pointer Matthew Heaney
2008-05-19 16:22 ` Pointer Matthew Heaney
2008-05-19 16:17 ` Pointer Matthew Heaney
2008-05-19 17:23 ` Pointer Sébastien
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox