From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,80435549e92d4e0c,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsread.com!news-xfer.newsread.com!newspeer.monmouth.com!news-east.rr.com!news.rr.com!newscon06.news.prodigy.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!news1.optus.net.au!optus!newsfeed.pacific.net.au!nasal.pacific.net.au!not-for-mail Newsgroups: comp.lang.ada Subject: Charles container library usage examples From: David Trudgett Organization: Very little? Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:vsvRlpiBoPTMZuZsacTuJ54YE8Y= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 03 Sep 2005 12:38:33 +1000 NNTP-Posting-Host: 61.8.43.41 X-Complaints-To: news@pacific.net.au X-Trace: nasal.pacific.net.au 1125715383 61.8.43.41 (Sat, 03 Sep 2005 12:43:03 EST) NNTP-Posting-Date: Sat, 03 Sep 2005 12:43:03 EST Xref: g2news1.google.com comp.lang.ada:4415 Date: 2005-09-03T12:38:33+10:00 List-Id: 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