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: a07f3367d7,d709f16086c9389b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns11feed!worldnet.att.net!164.128.36.58!news.ip-plus.net!newsfeed.ip-plus.net!news.post.ch!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: null array constant in Ada 83 Date: Tue, 23 Jun 2009 14:04:39 +0200 Organization: Swisscom IP+ (post doesn't reflect views of Swisscom) Message-ID: <4a40c4e8$1@news.post.ch> References: <4a4098dd$1@news.post.ch> NNTP-Posting-Host: 194.41.146.1 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: atlas.ip-plus.net 1245758701 13931 194.41.146.1 (23 Jun 2009 12:05:01 GMT) X-Complaints-To: abuse@ip-plus.net NNTP-Posting-Date: Tue, 23 Jun 2009 12:05:01 +0000 (UTC) User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) In-Reply-To: X-Original-NNTP-Posting-Host: w04asc.pnet.ch X-Original-Trace: 23 Jun 2009 14:04:56 +0200, w04asc.pnet.ch Xref: g2news2.google.com comp.lang.ada:6577 Date: 2009-06-23T14:04:39+02:00 List-Id: Frank J. Lhota schrieb: > Martin Krischik wrote: >> Hi, >> >> maintaining old code is such a great fun. Anybody know what goes where >> the 4 dots are (an appropriate N_Sel_List_Entry is declared). >> >> subtype T_Sel_Entries is Integer range 0 .. >> Selection_Types.Max_Selection_Results; >> >> type T_Sel_List is array (T_Sel_Entries range <>) of T_Sel_List_Entry; >> >> N_Sel_List : constant T_Sel_List (1 .. 0) := ....; >> >> Or is it just plain impossible in Ada 83. >> >> Regards >> >> Martin > > If N_Sel_Entry_Value is a value of type N_Sel_List_Entry, then you could > write > > N_Sel_List : constant T_Sel_List (1 .. 0) := > (1 .. 0 => N_Sel_Entry_Value); I see - I tried "other =>" - and that did not work at least not with Ada 83. > The fact that you have to provide a component value that is never used > is a well known annoyance. I know. Even more interesting is creating a constant of a null record (tied that in a prototype just recently). I found the syntax in the Ada 95 RM only to find out that Ada 83 does not know about it. But since it was a prototype I did not bother looking into it. Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com