comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Text control characters
Date: 1997/09/12
Date: 1997-09-12T00:00:00+00:00	[thread overview]
Message-ID: <EGEorv.GKs@world.std.com> (raw)
In-Reply-To: 341954D6.162C@gsfc.nasa.gov


In article <341954D6.162C@gsfc.nasa.gov>,
Stephen Leake  <Stephen.Leake@gsfc.nasa.gov> wrote:
>Dale Stanbrough wrote:
>> Thinking about it, the preprocessor selection of a with statement
>> would seem to be a fairly benign use of preprocessors. Can anyone see
>> any great harm in this scheme?
>
>you don't need a preprocessor;

True, but it doesn't answer Dale's question: Is there any great harm?

>... you can set things up so only the BODY of
>the package is OS dependent, and let the CM system choose which FILE to
>use for the body:

Quite true, but what does moving the OS-dependent stuff into the body
have to do with the issue of whether one uses preprocessors or CM
systems to select pieces of code?  I mean, your technique of selecting a
particular file would work fine on specs, too.

In fact, it might be important for whatever-it-is to be in the spec.
E.g. suppose I want to declare an integer constant whose value is
OS-dependent, but I desperately want the constant to be static?

>Under GNAT, since we're not using the conventional name for the body
>file, we need a configuration pragma:
>
>file gnat.adc:
>--------------------
>pragma Source_File_Name (OS.Line_Terminators,
>                         BODY_FILE_NAME =>
>"os-line_terminator__aix432.adb");
>--------------------

Then you need some way of selecting configuration files.  You can move
this problem around, and solve it with different tools, but you can't
make it go away!

- Bob




  reply	other threads:[~1997-09-12  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-09-10  0:00 Text control characters John Woodruff
1997-09-11  0:00 ` Anonymous
1997-09-11  0:00 ` Dale Stanbrough
1997-09-12  0:00   ` Robert A Duff
1997-09-15  0:00     ` Larry Kilgallen
1997-09-12  0:00   ` Stephen Leake
1997-09-12  0:00     ` Robert A Duff [this message]
1997-09-13  0:00   ` Tarjei T. Jensen
replies disabled

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