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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!f8g2000yqn.googlegroups.com!not-for-mail From: Ina Drescher Newsgroups: comp.lang.ada Subject: Initialization of Arrays in Ada Date: Wed, 24 Feb 2010 13:11:16 -0800 (PST) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 93.104.46.217 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1267045876 9355 127.0.0.1 (24 Feb 2010 21:11:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 24 Feb 2010 21:11:16 +0000 (UTC) Cc: wolfgang.meyerle@googlemail.com Complaints-To: groups-abuse@google.com Injection-Info: f8g2000yqn.googlegroups.com; posting-host=93.104.46.217; posting-account=bkJWCwoAAABsKAD2FMjLYTOI6TTI1g96 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; de-de) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:9306 Date: 2010-02-24T13:11:16-08:00 List-Id: Hi Ada Users, I have a question concerning the initialization of an array in Ada. For instance I have sth. like this: arr : Array (Integer Range<>) of Integer:=(1=>1, 2=>2); I just want to leave out the 1=> 2=> ... Is there any way like declating undefinite range arrays that ada does the counting work: In C in know this would be like this: char name[]="Test" and the compiler counts the number of characters. How is this done in Ada ? I know it's possible to count the number of entries for myself and then I could eliminate the 1=> ... so that it will look like this: arr : Array (Integer Range 1..2) of Integer:=(1, 2);