comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: Multiple procedures in the same adb file?
Date: Sun, 11 Jan 2015 16:02:12 -0500
Date: 2015-01-11T16:02:12-05:00	[thread overview]
Message-ID: <wcc7fwt9gkr.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: d8553a61-91a3-4967-8fd1-5698373c7d43@googlegroups.com

John Smith <yoursurrogategod@gmail.com> writes:

> Thanks, that was really helpful.

You're welcome.

>...  I got it to work by making the appropriate *.ads and *.adb files.
>I also had it working as a nested function.
>
> It seems a tad tedious at first, ...

Yes, it's a nuisance for small programs.  But for large programs,
one compilation_unit per file with a file-naming convention is
really the only sensible way.  But I must admit, I'd prefer GNAT
to be able to handle multiple compilation_units per file without
so much horsing around.

That's partly because when I'm debugging GNAT, I'm often working
with very small test programs.  If a customer hands me a huge
program that causes GNAT to crash, I'll usually try debugging
it directly first, but if I can't figure it out quickly that way,
I'll try making a small cut-down test that crashes in the same way.
If the small test case contains 30 lines of code in 5 files,
that's just a nuisance.  So I use gnatchop.

Most bug reports are already small.  The biggest one I had to
deal with at AdaCore was about 37,000,000 lines of code.

> ...but it does make sense.  Heck, even C/C++ recommends a similar
> approach.  You want to separate the declaration from the
> implementation.

Right, same idea.

- Bob

  reply	other threads:[~2015-01-11 21:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-11 18:37 Multiple procedures in the same adb file? John Smith
2015-01-11 19:05 ` John Smith
2015-01-11 19:51 ` Robert A Duff
2015-01-11 20:38   ` John Smith
2015-01-11 21:02     ` Robert A Duff [this message]
2015-01-11 21:51       ` John Smith
2015-01-12  0:53         ` Robert A Duff
2015-01-12  0:55         ` Robert A Duff
2015-01-13  0:11       ` Randy Brukardt
2015-01-11 21:38   ` Niklas Holsti
2015-01-12  0:53     ` Robert A Duff
2015-01-12  9:01       ` J-P. Rosen
2015-01-12 14:57         ` Robert A Duff
2015-01-13  0:09           ` Randy Brukardt
2015-01-12  0:55     ` Robert A Duff
2015-01-11 20:04 ` Jeffrey Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox