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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.129.48.201 with SMTP id w192mr13174629yww.224.1505370070490; Wed, 13 Sep 2017 23:21:10 -0700 (PDT) X-Received: by 10.36.95.213 with SMTP id r204mr53445itb.10.1505370070452; Wed, 13 Sep 2017 23:21:10 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!q8no131719qtb.0!news-out.google.com!p6ni522itp.0!nntp.google.com!127no207211itw.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 13 Sep 2017 23:21:09 -0700 (PDT) In-Reply-To: <4776d346-325b-4685-8ff4-ddb4ff6e08e3@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:1205:5055:3750:7139:fd73:7a19:29a4; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 2a02:1205:5055:3750:7139:fd73:7a19:29a4 References: <4776d346-325b-4685-8ff4-ddb4ff6e08e3@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <13b1d13e-38e5-44b7-9a79-e9b5cbb56b88@googlegroups.com> Subject: Re: use Ada.Text_IO in main() or Package? From: gautier_niouzes@hotmail.com Injection-Date: Thu, 14 Sep 2017 06:21:10 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2032 X-Received-Body-CRC: 1292606372 Xref: news.eternal-september.org comp.lang.ada:48118 Date: 2017-09-13T23:21:09-07:00 List-Id: The "with" clauses are always on top of the text, before anything (package,= procedure, function). A "use" clause opens the visibility ("use Ada.Text_IO" allows you to write = "Put" instead of "Ada.Text_IO.Put"), so it can be in the same region as "wi= th", or more locally, inside a function for instance. Sometimes it is more = practical to restrict the visibility. In a complex program, you may want to= have always a package name prefixed, like "Display.Line" for readability, = but in some function that displays plenty of things, it will be more readab= le to have a local "use Display;", then your bunch of Line(...); Circle(...= ); etc. are obviously from "Display". HTH Gautier _____________________________________________________________ A free online game in Ada: http://pasta.phyrama.com/game.html