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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8623fab5750cd6aa X-Google-Attributes: gid103376,public Path: g2news1.google.com!news2.google.com!proxad.net!wanadoo.fr!not-for-mail From: Pascal Obry Newsgroups: comp.lang.ada Subject: Re: Ragged arrays of strings (Was: Improving Ada's image) Date: 21 Jun 2004 00:01:31 +0200 Organization: Home - http://perso.wanadoo.fr/pascal.obry Message-ID: References: <40b9c99e$0$268$edfadb0f@dread16.news.tele.dk> <7J0xc.7371$8k4.269106@news20.bellglobal.com> <1086630278.542788@master.nyc.kbcfp.com> <8xlxc.27603$sS2.845496@news20.bellglobal.com> <1086715817.122983@master.nyc.kbcfp.com> <40C85035.4020706@noplace.com> <40C9EC3B.60304@noplace.com> <40CD90A4.8030005@noplace.com> <40CEDCB5.9000509@noplace.com> <1087325485.307616@master.nyc.kbcfp.com> <1087488758.881520@master.nyc.kbcfp.com> NNTP-Posting-Host: avelizy-151-1-26-72.w82-124.abo.wanadoo.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news-reader4.wanadoo.fr 1087768892 15810 82.124.112.72 (20 Jun 2004 22:01:32 GMT) X-Complaints-To: abuse@wanadoo.fr NNTP-Posting-Date: 20 Jun 2004 22:01:32 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.95 Xref: g2news1.google.com comp.lang.ada:1715 Date: 2004-06-20T22:01:32+00:00 List-Id: Jacob Sparre Andersen writes: > Pascal Obry wrote: > > > type String_Access is access constant String; > > type Color_Set is array (Positive range <>) of String_Access; > > > > Red : aliased constant String := "Red"; > > Green : aliased constant String := "Green"; > > Blue : aliased constant String := "Blue"; > > > > Colors : constant Color_Set := (Red'Access, Green'Access, Blue'Access); > > I tend to use Ada.Strings.Unbounded for ragged arrays of strings. I I too. But the question was to give an Ada equivalence to some C code posted. I think my proposal is closer to using Unbounded_String. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595