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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b81f19f08627984b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-30 06:11:37 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!server3.netnews.ja.net!newshost.central.susx.ac.uk!news.bton.ac.uk!not-for-mail From: John English Newsgroups: comp.lang.ada Subject: Re: PRIVATE abstract data type in ADS Date: Wed, 30 Oct 2002 13:24:27 +0000 Organization: University of Brighton Message-ID: <3DBFDD8B.7EC8EA6F@brighton.ac.uk> References: NNTP-Posting-Host: straumli.it.bton.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: saturn.bton.ac.uk 1035984225 21082 193.62.183.204 (30 Oct 2002 13:23:45 GMT) X-Complaints-To: news@bton.ac.uk NNTP-Posting-Date: 30 Oct 2002 13:23:45 GMT X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:30228 Date: 2002-10-30T13:23:45+00:00 List-Id: Dominic D'Apice wrote: > > Hi, in this abstract data type in ADS (see below), do i need to put > > "type louer is access reservation" with the "IS PRIVATE" ? > > If no, why i don't need to put "IS PRIVATE" after a access type when i > want to keep it PRIVATE ? If you had "type Lower is private" in the visible part of the package, the only things you could do with a Lower are assignment and equality testing (plus operations involving Lower defined in the visible part of the package). You couldn't do any of these things: L : Lower := new Reservation; R : Reservation := L.all; If you want package clients to be able to do this sort of thing, Lower has to be visibly an access type. So in the end, it's up to you to decide what you want to allow your clients to do with Lower objects... ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------