From: gautier_niouzes@hotmail.com
Subject: Re: Trivia: Ada packages are great!
Date: Wed, 7 Nov 2018 20:46:55 -0800 (PST)
Date: 2018-11-07T20:46:55-08:00 [thread overview]
Message-ID: <0c992f78-0496-4d8c-b046-fd75aae32599@googlegroups.com> (raw)
In-Reply-To: <5af3c4a0-5856-47ec-bb05-0ae9f9bb24ff@googlegroups.com>
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
next prev parent reply other threads:[~2018-11-08 4:46 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 21:11 Trivia: Ada packages are great! Olivier Henley
2018-11-05 10:39 ` Maciej Sobczak
2018-11-05 12:39 ` Björn Lundin
2018-11-06 8:52 ` Maciej Sobczak
2018-11-06 13:02 ` Olivier Henley
2018-11-07 7:02 ` Maciej Sobczak
2018-11-07 8:55 ` G. B.
2018-11-07 12:40 ` Olivier Henley
2018-11-08 12:35 ` Maciej Sobczak
2018-11-08 13:12 ` Olivier Henley
2018-11-09 2:15 ` gautier_niouzes
2018-11-07 8:53 ` Björn Lundin
2018-11-07 10:56 ` Maciej Sobczak
2018-11-07 18:27 ` G. B.
2018-11-08 12:20 ` Maciej Sobczak
2018-11-09 5:45 ` G. B.
2018-11-09 8:24 ` Maciej Sobczak
2018-11-09 9:03 ` Dmitry A. Kazakov
2018-11-12 6:33 ` G. B.
2018-11-05 17:20 ` Olivier Henley
2018-11-05 17:56 ` Olivier Henley
2018-11-05 18:07 ` Simon Wright
2018-11-05 19:37 ` Jeffrey R. Carter
2018-11-05 20:04 ` Olivier Henley
2018-11-05 20:12 ` Olivier Henley
2018-11-05 18:29 ` Olivier Henley
2018-11-05 20:03 ` Olivier Henley
2018-11-05 20:40 ` Olivier Henley
2018-11-08 4:46 ` gautier_niouzes [this message]
2018-11-08 12:28 ` Maciej Sobczak
2018-11-08 13:27 ` Olivier Henley
2018-11-08 14:44 ` gautier_niouzes
2018-11-08 15:01 ` Olivier Henley
2018-11-08 16:14 ` Simon Wright
2018-11-08 16:28 ` Olivier Henley
2018-11-11 6:49 ` Randy Brukardt
2018-11-11 7:01 ` Randy Brukardt
2018-11-11 7:01 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox