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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,41cd919c81c20b99,start X-Google-Attributes: gid103376,public From: "W. Wesley Groleau (Wes)" Subject: Questions on an 83->95 porting detail Date: 1997/01/24 Message-ID: <9701242001.AA16557@most>#1/1 X-Deja-AN: 212021198 sender: Ada programming language comments: Gated by NETNEWS@AUVM.AMERICAN.EDU mailer: Elm [revision: 70.85] newsgroups: comp.lang.ada Date: 1997-01-24T00:00:00+00:00 List-Id: Yes, I've seen the answers in print, but I'm having trouble finding it again... :-) 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." 2. What is the smallest change to the Ada-83 code for Heap_Management.Unconstrained so that all of its clients will compile with Ada 95? (I'd prefer to change the first generic instead of over fifty instantiations!) 3. What would be the minimum change to the same code so that all its clients will work properly with Ada 95? 4. Extra credit if the result is still legal, working Ada-83.... :-) * heap_management.ads contains: generic 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 * string_sequential_limited_unbounded_managed_iterator.ads starts out: generic type Item is limited private; type Substring is array (Positive range <>) of Item; * it also includes: private type Structure is access Substring; * string_sequential_limited_unbounded_managed_iterator.adb contains: package Heap_Management_Operations is new Heap_Management.Unconstrained -- line 42 (Item => Substring, Pointer => Structure); * gcc makes this complaint: string_sequential_limited_unbounded_managed_iterator.adb: 42:24: actual for "Item" must be a definite subtype --------------------------------------------------------------------------- W. Wesley Groleau (Wes) Office: 219-429-4923 Hughes Defense Communications (MS 10-41) Home: 219-471-7206 Fort Wayne, IN 46808 (Unix): wwgrol@pseserv3.fw.hac.com ---------------------------------------------------------------------------