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.5 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,caabf5265fad78e5 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news2.google.com!news.glorb.com!news2.glorb.com!wn11feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: unsigned type Reply-To: anon@anon.org (anon) References: <59O1m.404661$4m1.69194@bgtnsc05-news.ops.worldnet.att.net> <36286c5a-99f0-4ed9-8ef0-11d7af230216@e21g2000yqb.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Mon, 29 Jun 2009 19:47:59 GMT NNTP-Posting-Host: 12.65.6.97 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1246304879 12.65.6.97 (Mon, 29 Jun 2009 19:47:59 GMT) NNTP-Posting-Date: Mon, 29 Jun 2009 19:47:59 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:6726 Date: 2009-06-29T19:47:59+00:00 List-Id: The use of the "Index" attribute is the type of an example of conditional compiling statement, I would prefer to see instead of the C-like structure that is in GNAT GPL 2009. The use of the Pre-Processor is OK, its an add on package. Without Standards, Ada would not exit! And would not be govern by the ISO (the International Organization for Standardization) and the IEC (the International Electrotechnical Commission). Always use Standards. That one of many reason the Standard package exist. Its defines those standards. But in teaching Ada, prof allow the student to create their own all the time, a bad programming concept. So, the student assume wrongly that they can bypass standards and cause melt downs and programming errors. Where standards help prevent those errors. And not using Standards are the main reason the whole world is in the mess it is now. And changing to a standard is going to be painful. We all should of converted to standard when we first started. In , "Dmitry A. Kazakov" writes: >On Mon, 29 Jun 2009 01:42:31 -0700 (PDT), Martin wrote: > >> On Jun 29, 12:08�am, a...@anon.org (anon) wrote: >>> And as for Natural, well, that is the definition of a String's index and in most >>> cases you use Naturals in "for loop' statements. >> >> Why would you do that? >> >> If you iterating over an array object (e.g. a String), you should use >> 'Range, e.g. >> >> for I in My_Array'Range loop >> -- whatever >> end loop; > >Exactly. However there are cases like copying element of one array into >another, when you have to specify the index type explicitly. I always >wished an attribute Index, which for arrays would yield the index subtype >of the array: > > Index : A'Index; > >Another issue is shifted views of arrays. E.g. when you get two arrays A >and B, you could bring them to a coherent index range. > >-- >Regards, >Dmitry A. Kazakov >http://www.dmitry-kazakov.de