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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e61e0c2934b7f4d5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!p8g2000yqb.googlegroups.com!not-for-mail From: Gautier write-only Newsgroups: comp.lang.ada Subject: Re: Question on array of strings Date: Thu, 29 Oct 2009 15:46:36 -0700 (PDT) Organization: http://groups.google.com Message-ID: <80b616b3-15f4-4a0a-802a-c7d3a345e051@p8g2000yqb.googlegroups.com> References: NNTP-Posting-Host: 85.0.115.16 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1256856397 20336 127.0.0.1 (29 Oct 2009 22:46:37 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 29 Oct 2009 22:46:37 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p8g2000yqb.googlegroups.com; posting-host=85.0.115.16; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8861 Date: 2009-10-29T15:46:36-07:00 List-Id: Hello! My usual way of doing that is: function Event_To_String(Event : in Events_Type) return String is begin case Event is when Ev1 => return "ev3434"; when Ev2 => return "evEnd"; end case; end; You live longer without pointer ;-). For more complicated cases, I use unbounded strings, like there: type External_packer_info is record name, title, URL, options: Unbounded_String; expanded_options : Unbounded_String; -- options with dynamically expanded tokens made_by_version : Unsigned_16; pkzm : Zip.PKZip_method; end record; ext: array(External) of External_packer_info:= ( (U("zip.exe"), U("Zip"), U("http://info-zip.org/"), U("-9"), U (""), 20, Zip.deflate), -- Zip 2.32 or later ... ); HTH _________________________________________________________ Gautier's Ada programming -- http://sf.net/users/gdemont/ NB: For a direct answer, e-mail address on the Web site!