comp.lang.ada
 help / color / mirror / Atom feed
* Function/Call in Ada to detect operating system?
@ 2006-04-20 19:35 AAFellow
  2006-04-20 20:48 ` Marc A. Criley
  2006-04-20 21:40 ` AAFellow
  0 siblings, 2 replies; 3+ messages in thread
From: AAFellow @ 2006-04-20 19:35 UTC (permalink / raw)


Hey guys,

Is there a way to detect what operating system the code is running on?
I'm writing my code to work on both windows and linux, and there are
some parts where I would like to do something like this:

If(Windows)
     *Do something this way;
else if (Linux)
     *Do something a slightly different way;


thanks guys!!




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Function/Call in Ada to detect operating system?
  2006-04-20 19:35 Function/Call in Ada to detect operating system? AAFellow
@ 2006-04-20 20:48 ` Marc A. Criley
  2006-04-20 21:40 ` AAFellow
  1 sibling, 0 replies; 3+ messages in thread
From: Marc A. Criley @ 2006-04-20 20:48 UTC (permalink / raw)


AAFellow@hotmail.com wrote:

> Is there a way to detect what operating system the code is running on?
> I'm writing my code to work on both windows and linux, and there are
> some parts where I would like to do something like this:
> 
> If(Windows)
>      *Do something this way;
> else if (Linux)
>      *Do something a slightly different way;

There was a huge thread on this subject in this group a few months ago, 
here's a link to the root posting (caution, may line wrap):

http://groups.google.com/group/comp.lang.ada/browse_frm/thread/f890526de6a8a218/593e4f90fb944fa4?q=windows+linux+system&rnum=3#593e4f90fb944fa4

-- Marc A. Criley
-- McKae Technologies
-- www.mckae.com
-- DTraq - XPath In Ada - XML EZ Out



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Function/Call in Ada to detect operating system?
  2006-04-20 19:35 Function/Call in Ada to detect operating system? AAFellow
  2006-04-20 20:48 ` Marc A. Criley
@ 2006-04-20 21:40 ` AAFellow
  1 sibling, 0 replies; 3+ messages in thread
From: AAFellow @ 2006-04-20 21:40 UTC (permalink / raw)


Thanks, I used the idea of writing a function to determine the OS based
on path delimiters, and it worked perfectly.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-04-20 21:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-20 19:35 Function/Call in Ada to detect operating system? AAFellow
2006-04-20 20:48 ` Marc A. Criley
2006-04-20 21:40 ` AAFellow

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