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 X-Google-Thread: 103376,4e2dfdc3b0f2775d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-23 01:41:55 PST Message-ID: <3B84C0DE.79F20395@amsjv.com> Date: Thu, 23 Aug 2001 09:37:50 +0100 From: Philip Anderson Organization: Alenia Marconi Systems ISD X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Stream_Element_Array and an empty array References: <3B83C03F.8F1A6357@gsde.hou.us.ray.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit NNTP-Posting-Host: cwmwkn0612.cwmbran.gecm.com X-Trace: 23 Aug 2001 09:27:46 GMT, cwmwkn0612.cwmbran.gecm.com Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!212.74.64.35!colt.net!newspeer.clara.net!news.clara.net!btnet-peer!btnet-peer0!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!cwmwkn0612.cwmbran.gecm.com Xref: archiver1.google.com comp.lang.ada:12313 Date: 2001-08-23T09:37:50+01:00 List-Id: "Samuel T. Harris" wrote: > > Given that in the above text A is a variable, > no assignment is necesary. If you must have > an assignment, or an initial expression > because it is constant, then you can > do the following ... > > nil : constant stream_element_array (1..0) := (others => 0); > ... > a := nil; That must the clearest Ada way of obtaining a zero-length array of a particular type; declare an example and give it a suitable name (Nil, Empty_Array, Zero_Length_Array, whatever), since the result of this particular Ada idiom is easier to understand given this clue. It then becomes obvious what you are doing when you pass it as a parameter. -- hwyl/cheers, Philip Anderson Alenia Marconi Systems Cwmbr�n, Cymru/Wales