Lahey Support
08-15-2003, 01:19 AM
Dear cosine Cheng
This program works well on Windows and on the HP
computer of my firm (SPP2000
http://www.cilea.it/~miglioli/ARCHITETTURA/spp2000.htm )
I did not tested it in other (non Intel) Unix environments...
Sincerely
Giampaolo Bottoni
e-mail: [address removed]
http://www.cilea.it/~bottoni
================================================== ======
program scopro_win
implicit none
integer::x
character(4)::cx
x=1
cx=transfer(x,cx)
if(cx(1:1).ne.cx(2:2)) then
write(*,*) "I am working in Windows"
else
write(*,*) "I am working in Unix"
end if
write(*,*)"Invia..."
read(*,*)
stop
end program scopro_win
================================================== ====
In 18.02 10/01/99 PST, hai scritto:
>Dear All:
>
> How to write a FORTRAN90 code to auto determine
>
>which operation system is used? That is, the code
>
>can find is it running in UNIX or in MS-Win, etc.
>
>
>Tks. :)
>
>by Cheng Cosine
> Jan/10/1999 UT
>
>__________________________________________________ ____
>Get Your Private, Free Email at http://www.hotmail.com
>
>
This program works well on Windows and on the HP
computer of my firm (SPP2000
http://www.cilea.it/~miglioli/ARCHITETTURA/spp2000.htm )
I did not tested it in other (non Intel) Unix environments...
Sincerely
Giampaolo Bottoni
e-mail: [address removed]
http://www.cilea.it/~bottoni
================================================== ======
program scopro_win
implicit none
integer::x
character(4)::cx
x=1
cx=transfer(x,cx)
if(cx(1:1).ne.cx(2:2)) then
write(*,*) "I am working in Windows"
else
write(*,*) "I am working in Unix"
end if
write(*,*)"Invia..."
read(*,*)
stop
end program scopro_win
================================================== ====
In 18.02 10/01/99 PST, hai scritto:
>Dear All:
>
> How to write a FORTRAN90 code to auto determine
>
>which operation system is used? That is, the code
>
>can find is it running in UNIX or in MS-Win, etc.
>
>
>Tks. :)
>
>by Cheng Cosine
> Jan/10/1999 UT
>
>__________________________________________________ ____
>Get Your Private, Free Email at http://www.hotmail.com
>
>