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 X-Google-Thread: 103376,c999596f866f316a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-10 12:19:52 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dennison@telepath.com (Ted Dennison) Newsgroups: comp.lang.ada Subject: Re: with and use Date: 10 Jul 2002 12:17:48 -0700 Organization: http://groups.google.com/ Message-ID: <4519e058.0207101117.7127665b@posting.google.com> References: <3D2C2FF9.4020300@yahoo.com> <3D2C3A69.8070207@yahoo.com> NNTP-Posting-Host: 65.115.221.98 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1026328669 1731 127.0.0.1 (10 Jul 2002 19:17:49 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 10 Jul 2002 19:17:49 GMT Xref: archiver1.google.com comp.lang.ada:26994 Date: 2002-07-10T19:17:49+00:00 List-Id: "Jean-Pierre Rosen" wrote in message news:... > "David Rasmussen" a �crit dans le message news: > > So with corresponds roughly to an #include of some header file that > > defines prototypes etc. for some other compilation unit in C++, and use > > corresponds roughly to "using namespace Whatever", assuming that the > > things included were in a seperate namespace? > Roughly :-) Yeah, in the same way that a hacksaw roughly corresponds to a chainsaw: You generally use them for the same kinds of tasks, but thinking of them as the *exact* same thing can be hazardous to your health. > > "with" and only appear at the top of a unit. Where can "use" appear? > > > At any place a declaration can appear, and like any declaration, its effects > extends from where it is declared to the corresponding > "end". In addition, it can also appear in a context clause. The use clause is very contraversial, as it effectivly flattens a namespace that was (possibly) designed to be hierarchal. I generally suggest that beginners avoid the "use" clause (although not "use type"). Practice a while using full dot notation until you are competent enough with Ada to intelligently decide where you stand on the issue.