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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!decwrl!ucbvax!SPIKE.llnl.gov!KETTERING From: KETTERING@SPIKE.llnl.gov (Brett 'Volleyball is my game' Kettering) Newsgroups: comp.lang.ada Subject: Use of operators on limited private types . . . Message-ID: <56A72BEBE52F8004CF@icdc.llnl.gov> Date: 2 Aug 90 15:20:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet List-Id: With regards to Message-ID: <1152@cs.nps.navy.mil> from cs!erickson@lll-winken.llnl.gov (David Erickson) David writes >Is there any way to define "=" for a limited private type which is an >access type (which may be null)? The problem arises trying to test for >null without producing an infinitely recursive definition. According to my understanding of the philosophy of Ada the client of a limited private type should not have that particular operator, along with all the others, to use. It is the responsibility of the package that exports that limited private type to provide all of these functions to the client as that package sees fit. So in your case above perhaps the package that exports the limited private type, which is a pointer, may want to provide a function IS_NULL and a procedure DESTROY. By this manner you don't care that it is a pointer and needs to have its object deallocated. The package does that for you. If on the other hand your concern is about a limited private type that is a generic formal parameter to some package then that package should also have generic formal parameters that are the function and the procedure I mentioned in the previous paragraph. In this manner the client of the package tells the package about his limited private type and how to manipulate it. Brett M. Kettering KETTERING@SPIKE.llnl.gov