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-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!wn13feed!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: unsigned type Reply-To: anon@anon.org (anon) References: X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Tue, 30 Jun 2009 23:48:51 GMT NNTP-Posting-Host: 12.64.120.114 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1246405731 12.64.120.114 (Tue, 30 Jun 2009 23:48:51 GMT) NNTP-Posting-Date: Tue, 30 Jun 2009 23:48:51 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:6776 Date: 2009-06-30T23:48:51+00:00 List-Id: Read RM 3.5 ( 4 ) Is "A ( 0 .. 0 )" an example of null range. By the definition in RM 3.5 ( 4 ), the Right side range (index) must be less than the Left side, so "A ( 0.. 0 )" is not a valid null range statement. So, this statement should generate a compiler or runtime error, because either range is not a subset of the range for Strings. Reference: RM 3.5 Scalar Types 4 A range has a lower bound and an upper bound and specifies a subset of the values of some scalar type (the type of the range). A range with lower bound L and upper bound R is described by ``L .. R''. If R is less than L, ^^^^^^^^^^^^^^^^^^^^ then the range is a null range, and specifies an empty set of values. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Otherwise, the range specifies the values of the type from the lower bound to ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the upper bound, inclusive. A value belongs to a range if it is of the type ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ of the range, and is in the subset of values specified by the range. A value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ satisfies a range constraint if it belongs to the associated range. One ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ range is included in another if all values that belong to the first range also belong to the second. In , Adam Beneschan writes: >On Jun 30, 8:59=A0am, Albrecht K=E4fer wrote: >> Adam Beneschan schrieb: >> >> >> So it is not a bug, it doesn't prove that the index is natural, it's >> >> just the intended behaviour, designed in a way that makes user's life >> >> easier - at the cost of compiler writers' life. >> >> > As a compiler writer, PLEASE TELL ME YOU DIDN'T MEAN THAT LAST PART >> > LITERALLY!!!!!!! >> >> From what I gathered, this seems to be an important part of the Ada >> philosophy. > >It's an important part of the Ada philosophy that working on writing >an Ada compiler will cost you your life? > >> Probably the best example is tasking. > >OK, maybe that *is* a good example. I've worked on tasking.... But >I'm not quite dead yet, and I might still be able to pull through. >(Depending on what changes the ARG may make to 3.10.2...) > > -- Adam >