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.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!steinmetz!ge-dab!peora!petsd!cjh From: cjh@petsd.UUCP (Chris Henrich) Newsgroups: comp.lang.ada Subject: Re: Generics: 'Retraction' and an example Summary: C3Ada handles the example Message-ID: <1327@petsd.UUCP> Date: 7 Sep 88 21:50:55 GMT References: <8809061331.AA11160@mitre-bedford.ARPA> Reply-To: cjh@petsd.UUCP (Chris Henrich) Organization: Perkin-Elmer DSG, Tinton Falls, N.J. List-Id: In article <8809061331.AA11160@mitre-bedford.ARPA> emery@MITRE-BEDFORD.ARPA.UUCP writes: > >However, here's an example of something that I can do on Verdix that >DEC and (some) other compilers do not like. I believe this is legal Ada. I believe so too, and Concurrent Computer Corporation's compiler seems to handle it correctly. > >package A is > > generic > package B is > function foo return integer; > end B; > >end A; > >package body A is > x : integer; > > package body B is separate; > > package my_b is new b; > -- some compilers don't like this instantiation > -- DEC (VMS 1.3-24) and Tartan (Sun 2.0) are two that don't > -- Verdix (Sun 5.5j) compiles this just fine. >begin > x := my_b.foo; >end A; > >separate (A) >package body B is > function foo return integer is > begin > return 42; -- life, the universe, and everything... > end foo; >end B; > > dave emery > emery@mitre-bedford.arpa Regards, Chris UUCP: ...!rutgers!petsd!cjh Concurrent Computer Corporation is a Perkin-Elmer company.