From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 5 Oct 92 15:38:17 GMT From: simonson@beaver.cs.washington.edu (Kevin Simonson) Subject: Re: Ada question: access types Message-ID: <1992Oct5.153817.29108@beaver.cs.washington.edu> List-Id: In article <60887@mimsy.umd.edu> alex@cs.umd.edu (Alex Blakemore) writes: =In article <1992Oct4.211734.9047@seas.gwu.edu> nreich@seas.gwu.edu (Norman =Reich) writes: = =Assume =package my_types is = => TYPE ptr IS ACCESS node; => TYPE node IS => RECORD => name ... => ... => nextn :ptr; => END RECORD; => nl :ptr; = =and in another library unit => if (nl = NULL) then --error at this line => type clash in parameter to "=" = =type ptr is probably in a different package than the if statement. =you probably made type ptr visible via a with clause and did not =make it _directly_ visible via a use clause. This is probably the problem, but let me also note that after copying exactly what Norman had written into a _single_ file, I got nearly the same error message he was talking about. My compiler (Verdix) told me: if (nl = NULL) then ---------#^# -- error: RM 4.5: does not conform to any visible operator #^# which sounded similar to the error message Norman got. However, earlier in my code I also got the message: TYPE ptr IS ACCESS node; ---------------------#^# -- error: RM 8.3: identifier undefined #^# Apparently if "nl" is defined as a type that the compiler doesn't un- derstand, then it concludes that the type of "nl" doesn't match with "NULL". I added type node; earlier in the program and it compiled just fine. Norman, you might check your code to make sure you referred to type "node" before the line that de- fined "ptr". ---Kevin