comp.lang.ada
 help / color / mirror / Atom feed
From: Dale Stanbrough <dale@goanna.cs.rmit.edu.au>
Subject: Re: Text control characters
Date: 1997/09/11
Date: 1997-09-11T00:00:00+00:00	[thread overview]
Message-ID: <5v9vj1$dge$1@goanna.cs.rmit.edu.au> (raw)
In-Reply-To: uden6xytd8.fsf@tanana.llnl.gov


The question is

	"how can i write operating system dependent stuff in an 
	 operation independent manner"


and the answer is

	"by isolating O/S dependent stuff in a package"


package Unix.Line_Terminators is
   Line_Terminator : constant String := Ascii.LF & "";
   
end;


with Unix.Line_Terminators;
package OS.Line_Terminators is


   Line_Terminator : String renames Unix.Line_Terminators.Line_Terminator;


end;


and then get your configuration system to choose the appropriate with
(maybe even use a preprocessor! to select a with statement).

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?


Dale




  reply	other threads:[~1997-09-11  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 ` Dale Stanbrough [this message]
1997-09-12  0:00   ` Stephen Leake
1997-09-12  0:00     ` Robert A Duff
1997-09-12  0:00   ` Robert A Duff
1997-09-15  0:00     ` Larry Kilgallen
1997-09-13  0:00   ` Tarjei T. Jensen
1997-09-11  0:00 ` Anonymous
replies disabled

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