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,6cb2525ffbfe23ce X-Google-Attributes: gid103376,public From: Brian Hanson Subject: Re: Why both "with" and "use"? Date: 1999/02/19 Message-ID: <36CDA87B.E0F36D27@lawson.com>#1/1 X-Deja-AN: 446136750 Content-Transfer-Encoding: 7bit References: <36C5B28C.F32C43A4@jps.net> <7acj53$1vu@news3.newsguy.com> <7af68r$52o$1@platane.wanadoo.fr> <7ahq7p$s6k$1@nnrp1.dejanews.com> <7ai7p1$8kp$1@nnrp1.dejanews.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@mr.net X-Trace: news.mr.net 919426212 22730 206.145.14.2 (19 Feb 1999 12:10:12 GMT) Organization: Lawson Software Mime-Version: 1.0 NNTP-Posting-Date: 19 Feb 1999 12:10:12 GMT Newsgroups: comp.lang.ada Date: 1999-02-19T12:10:12+00:00 List-Id: Slightly less obvious. package Rd is type T is new Integer; function Mumble(V: T) return Integer; end Rd; with Rd; procedure main is type Z is new Rd.T; Vi: integer; begin vi := Mumble(25); end; "Robert I. Eachus" wrote: > In article <7ai7p1$8kp$1@nnrp1.dejanews.com> robert_dewar@my-dejanews.com writes: > > > Not always, here is a little puzzle for the folks out in CLA-land: > > A unit contains: > > x := Mumble (Q); > > a search of the unit in which this statement appears shows > > no other trace of the string Mumble, and no dreaded use clauses. > > How could this be? > > Easy: > > package ADT is > type Froz is new Integer; > procedure Mumble(F: in out Froz); > end ADT; > > package body ADT is > procedure Mumble(F: in out Froz) is > begin F := F + 1; end Mumble; > end ADT; > > with ADT; > procedure Main is > type Frozbaz is new ADT.Froz; > X: Frozbaz := 0; > begin > Mumble(X); > end Main; > -- > > Robert I. Eachus > > with Standard_Disclaimer; > use Standard_Disclaimer; > function Message (Text: in Clever_Ideas) return Better_Ideas is...