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,3957a46660bc0588 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-12 12:34:34 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread4.news.pas.earthlink.net.POSTED!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: strings and multidimensional arrays References: <3F88D320.80706@chartermi.net> <3F88E586.5060809@chartermi.net> <3F89621F.7070406@comcast.net> In-Reply-To: <3F89621F.7070406@comcast.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sun, 12 Oct 2003 19:34:33 GMT NNTP-Posting-Host: 63.184.32.94 X-Complaints-To: abuse@earthlink.net X-Trace: newsread4.news.pas.earthlink.net 1065987273 63.184.32.94 (Sun, 12 Oct 2003 12:34:33 PDT) NNTP-Posting-Date: Sun, 12 Oct 2003 12:34:33 PDT Xref: archiver1.google.com comp.lang.ada:748 Date: 2003-10-12T19:34:33+00:00 List-Id: Robert I. Eachus wrote: > type Contents_Type is (None, Integer_Data, Some_String, > Integer_and_String, Subprogram_Access, ...); > > type Contents(CT: Contents_Type := None) is record > case CT is > when None => null; > when Integer_Data => I: Integer; > when Some_String => U: Ada.Strings.Unbounded.Unbounded_String; > when Integer_and_String => > The_Integer: Integer; > The_String: Ada.Strings.Unbounded.Unbounded_String; > when Subprogram_Access => FP: Function_Pointer; > when ... > end case; > end record; > > type Element is record > C: Contents := (CT => None); > end record; > > type My_Array is array(Natural range <>; Natural range <>) of Element; This is along the lines of what I was going to suggest. I don't understand, though, why you wrapped the Contents record in the Element record. I would simply say type Thing is array (Positive range <>, Positive range <>) of CT; Since you're a language lawyer and I'm not, I guess I'm missing something here, and wonder what it is. -- Jeff Carter "I've got to stay here, but there's no reason why you folks shouldn't go out into the lobby until this thing blows over." Horse Feathers 50