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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news.glorb.com!wn11feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: null array constant in Ada 83 Reply-To: anon@anon.org (anon) References: <4a4098dd$1@news.post.ch> <4a40c4e8$1@news.post.ch> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: <2o50m.84630$d36.46020@bgtnsc04-news.ops.worldnet.att.net> Date: Tue, 23 Jun 2009 14:11:10 GMT NNTP-Posting-Host: 12.64.204.178 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1245766270 12.64.204.178 (Tue, 23 Jun 2009 14:11:10 GMT) NNTP-Posting-Date: Tue, 23 Jun 2009 14:11:10 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:6579 Date: 2009-06-23T14:11:10+00:00 List-Id: Even though there are many features that are the same, there are also many changes from Ada 83 to Ada 95 or Ada 2005 so that you should download and use the Ada 83 LRM for maintain Ada 83 programs. So you might need to use "'First" or "'Last" to define a initial value -- N_Sel_Entry_Value is used set to an inital value N_Sel_Entry_Value : constant T_Sel_List_Entry := T_Sel_List_Entry'First; N_Sel_List : constant T_Sel_List (1 .. 0) := (1 .. 0 => N_Sel_Entry_Value); Ada 83 RM 3.2.1 OPTION : BIT_VECTOR(1 .. 10) := (others => TRUE); Then Ada 83 RM 3.6 defines type TABLE is array(1 .. 10) of INTEGER; then from, Ada 83 RM 4.3.2 Array Aggregates TABLE'(5, 8, 4, 1, others => 0) -- see 3.6 In <4a40c4e8$1@news.post.ch>, Martin Krischik writes: >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