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 2002:a24:68c7:: with SMTP id v190-v6mr2582757itb.12.1541652416056; Wed, 07 Nov 2018 20:46:56 -0800 (PST) X-Received: by 2002:aca:37c1:: with SMTP id e184-v6mr9355oia.5.1541652415921; Wed, 07 Nov 2018 20:46:55 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.166.215.MISMATCH!z5-v6no60697ite.0!news-out.google.com!t123-v6ni1itb.0!nntp.google.com!g188-v6no57374itg.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 7 Nov 2018 20:46:55 -0800 (PST) In-Reply-To: <5af3c4a0-5856-47ec-bb05-0ae9f9bb24ff@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:1206:45c6:8b20:685c:c174:505f:1b54; posting-account=gRqrnQkAAAAC_02ynnhqGk1VRQlve6ZG NNTP-Posting-Host: 2a02:1206:45c6:8b20:685c:c174:505f:1b54 References: <5af3c4a0-5856-47ec-bb05-0ae9f9bb24ff@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0c992f78-0496-4d8c-b046-fd75aae32599@googlegroups.com> Subject: Re: Trivia: Ada packages are great! From: gautier_niouzes@hotmail.com Injection-Date: Thu, 08 Nov 2018 04:46:56 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:54791 Date: 2018-11-07T20:46:55-08:00 List-Id: Actually some Ada compilers let you organize files as you want. For instance the following file compiles successfully with ObjectAda 10.0 (the latest version), right now: ----8<----8<----8<----8< package u1 is end; package u2 is end; package u3 is end; package u4 is procedure p4; end; package body u4 is -- a body! oh: constant := 3; procedure p4 is begin null; end; end; procedure p5 is begin null; end; -- a body! function f6 return Integer; ----8<----8<----8<----8< IIRC it is possible with DEC Ada as well. Anyway, you can reorganize automatically your files with GNAT's convention using gnatchop: copy all files into one (copy *.ad* big.txt), then move big.txt in an empty sandbox, then: gnatchop big.txt. That's it... Now, the discussion about files has overshadowed the initial point of this thread: in Ada, *everything* must be inside a unit (package, procedure or function) with a name, and *that* is an extremely useful feature compared to "flat" languages! _________________________ Gautier's Ada programming http://gautiersblog.blogspot.com/search/label/Ada NB: follow the above link for a valid e-mail address