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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,41cd919c81c20b99 X-Google-Attributes: gid103376,public From: "Keith Allan Shillington" Subject: Re: Questions on an 83->95 porting detail Date: 1997/01/27 Message-ID: <01bc0c8c$f8f3e720$fc00af88@godiva>#1/1 X-Deja-AN: 212706306 sender: news@thomsoft.com (USENET News Admin @flash) x-nntp-posting-host: leonidas references: <9701242001.AA16557@most> organization: Aonix, San Diego, CA, USA newsgroups: comp.lang.ada Date: 1997-01-27T00:00:00+00:00 List-Id: W. Wesley Groleau (Wes) wrote in article <9701242001.AA16557@most>... > 1. Since a NOTE is not a rule, but only a "consequence of [a] rule > defined elsewhere," what is/are the rule(s) that 12.5.1(28) is a > consequence of? 12.5.1(17) says I need a member of the "class of > all types" but 12.5.1(28) says, "No, you need a member of the > class of all definite types." That would be 12.5.1(7) and 12.5.1(11) Where the difference between a formal with and without a discriminant. Actually the key wording is at 12.5.1(6) "If the formal subtype is definite, then the actual subtype shall also be definite." So, 12.5.1(28) is a direct result of 12.5.1(6) > 2. What is the smallest change... see below > 3. What would be the minimum change... see below > 4. Extra credit if the result is still legal, working Ada-83.... :-) No can do. > * heap_management.ads contains: > > generic > type Item is limited private; type Item is limited private (<>); > type Pointer is access Item; > package Unconstrained is > -- intended to be used for unconstrained types > -- an alternate, more efficient, version is offered for constrained types Given the comment in the package spec, this software is designed to allow for the unknown discriminant. Ada95 requires that you inform the compiler of this design decision. Sadly, your Ada83 compiler will not recognize this new syntax. -- Keith Shillington keith@sd.aonix.com