comp.lang.ada
 help / color / mirror / Atom feed
* Charles container library usage examples
@ 2005-09-03  2:38 David Trudgett
  2005-09-03  5:15 ` Matthew Heaney
  0 siblings, 1 reply; 29+ messages in thread
From: David Trudgett @ 2005-09-03  2:38 UTC (permalink / raw)


Does anyone know where I can find some usage examples for the Charles
container library, or some code that makes use of Charles? 

I've got Charles downloaded and installed on my include path, but as a
newcomer to Ada, I'm having difficulty working out how it is intended
to be used.

The first thing I had in mind to do was to create a simple map, for
example, to translate the following Common Lisp:

(defvar *side-corners*
  '((2 (1 3))
    (4 (1 7))
    (6 (3 9))
    (8 (7 9))))

This is just a simple mapping of four particular integers (2, 4, 6, 8)
to four particular lists each consisting of two integers.

I use it in a function like this:

(defun side-corners (side)
  "Return a list of the (two) corners that flank the given side"
  (second (assoc side *side-corners*)))

so that the function call

(side-corners 2)

returns the list (1 3)


Any pointers to code samples, or other hints would be greatly
appreciated!

Thanks,

David



-- 

David Trudgett
http://www.zeta.org.au/~wpower/

Omnis enim res, quae dando non deficit, dum habetur
     et non datur, nondum habetur, quomodo habenda est.

For if a thing is not diminished by being shared with others,
     it is not rightly owned if it is only owned and not shared.

Book I, Chapter 1 "De doctrina christiana"
"Corpus Christianorum", "Series latina", Vol. 32, p. 6, lines 10-11.
Written 397 AD by Saint Augustinus




^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2005-09-24  0:05 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-03  2:38 Charles container library usage examples David Trudgett
2005-09-03  5:15 ` Matthew Heaney
2005-09-03  9:45   ` Simon Wright
2005-09-04  6:25     ` David Trudgett
2005-09-05 11:28       ` Georg Bauhaus
2005-09-04  0:26   ` David Trudgett
2005-09-04  9:49     ` Matthew Heaney
2005-09-06  3:01       ` David Trudgett
2005-09-06 16:22         ` Jeffrey Carter
2005-09-07  0:15         ` Matthew Heaney
2005-09-04 17:19     ` Ludovic Brenta
2005-09-06  3:01       ` David Trudgett
2005-09-06  5:08         ` Ludovic Brenta
2005-09-06  6:46           ` David Trudgett
2005-09-06  7:26             ` Ludovic Brenta
2005-09-24  0:05               ` Randy Brukardt
2005-09-09 14:57         ` James Alan Farrell
2005-09-10  7:38           ` David Trudgett
2005-09-10 14:55             ` Matthew Heaney
2005-09-10 15:26               ` Ludovic Brenta
2005-09-10 17:58                 ` Matthew Heaney
2005-09-12  0:24               ` Robert A Duff
2005-09-11 10:52             ` Georg Bauhaus
2005-09-11 21:14               ` David Trudgett
2005-09-13 23:41                 ` Björn Persson
2005-09-14  6:39                   ` David Trudgett
2005-09-12  0:21             ` Robert A Duff
2005-09-12  0:57               ` David Trudgett
2005-09-12  1:01                 ` Robert A Duff

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