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,40d697764033dbdb X-Google-Attributes: gid103376,public From: st92j0gw@dunx1.ocs.drexel.edu (Chris Papademetrious) Subject: Re: types in procedure arguments Date: 1996/09/30 Message-ID: <52nj8q$4ck@noc2.drexel.edu>#1/1 X-Deja-AN: 186157127 references: organization: Drexel University newsgroups: comp.lang.ada Date: 1996-09-30T00:00:00+00:00 List-Id: dewar@schonberg.cs.nyu.edu (Robert Dewar) wrote: >"gcc -c best_test.adb >best_test.adb:45:35: expected private type "LIST_ID" defined at >double_list.ads: 43 >best_test.adb:45:35: found private type "LIST_ID" defined at >double_list.ads:43 >" >This is almost certainly a bug in GNAT, but you did not say what version >you are using (most such bugs were squashed a while ago). If you are using >the current version, or even a version from 3.04 on, then send along a bug >report to report@gnat.com. if you are using an earlier version, then upgrade >first. We're using gnat 3.05, and I really believe that GNAT is correct and I'm misunderstanding something about Ada 95 here. I want to pass the type LIST_ID to a procedure I've defined. The problem is that I've defined the type LIST_ID twice: 1. at the beginning of the level where I call this procedure 2. in the package that holds the procedure itself, so I can use the type LIST_ID as a procedure argument The problem here is that each of these originates a new and unique "type LIST_ID" which aren't compatible with each other. Thus, the calling statement that passes a type (1) of LIST_ID does not match the type (2) LIST_ID of the argument in the procedure being called! This seems basic, the idea of calling a subprogram with a type, and needing to define the type in a package so the subprogram can be declared. How is this handled in Ada 95??? I'd be more than happy to provide a small test program, if anyone could lend me a hand. I've been battling this for two weeks, and no books have been of any help. - Chris -=-=-=-=-=-=-=-=-=-=-=-=- Chris Papademetrious Data Fusion Laboratory Drexel University Philadelphia, PA -=-=-=-=-=-=-=-=-=-=-=-=-