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,1d485db3760413be X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-17 06:43:50 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!enews.sgi.com!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!newsfeed.news2me.com!newsfeed-west.nntpserver.com!hub1.meganetnews.com!nntpserver.com!telocity-west!TELOCITY!sn-xit-03!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: Compiler default initialization of array types Date: Thu, 17 Oct 2002 09:42:24 -0400 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:29868 Date: 2002-10-17T09:42:24-04:00 List-Id: "Sebastian" wrote in message news:aombha$ong$1@newstoo.ericsson.se... > I wonder if Ada always assignes Array types with default values? Only if the component subtype is default initialized. Otherwise no. For example: declare S : String (1 ..10); begin The array S is NOT initialized. However, if we have this: type String_Access_Array is array (Positive range <>) of Ada.Strings.Unbounded.String_Access; declare S : String_Access_Array (1 .. 10); begin Then here array S IS initialized. > In case this is true; is there some way to suppress this feature? As someone already pointed out, you might be able to use pragma Import (Ada, ) to suppress the initialization, but I haven't tried this with an array object. Another possibility is to turn off default-initialization of the array component subtype. Is there a pragma to do this? I forget. However, if the array component subtype is controlled, I don't think there's any way to turn of controlled initialization. But I wouldn't think you'd want to, either. Is the array component subtype scalar? Perhaps we could help you more if you provided the declarations of the array component subtype and array subtype.