Re: getting env. variables in gfortran...
- From: kargl@xxxxxxxxxxxxxxxxxxxxxxxxxxxx (Steven G. Kargl)
- Date: Thu, 13 Apr 2006 19:03:27 +0000 (UTC)
In article <1144944470.258669.271360@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
icksa1@xxxxxxxxx writes:
Hi:
I'm trying to compile a code in gfortran that needs to know the values
of several environment variables...I was wondering if there was a
function, like getenv, that would return the values, something like...
path = getenv("PATH") or
call getenv("PATH",path)
troutmask:kargl[207] gfortran -o a a.f90
troutmask:kargl[208] setenv UPSIDE down
troutmask:kargl[209] ./a
upside = down
troutmask:kargl[210] cat a.f90
program a
character(len=40) up
call getenv("UPSIDE", up)
print *, 'upside = ', up
end program a
Note, if you don't find an intrinsic procedure listed in the
gfortran documentation, then check the old g77 manual. Gfortran
has (or should have) implemented all of the procedures available
in g77. Unfortunately, gfortran documentation is lagging
behind.
--
Steve
http://troutmask.apl.washington.edu/~kargl/
.
- References:
- getting env. variables in gfortran...
- From: icksa1
- getting env. variables in gfortran...
- Prev by Date: Re: very difficult debug with ifort
- Next by Date: Re: very difficult debug with ifort
- Previous by thread: getting env. variables in gfortran...
- Next by thread: Re: getting env. variables in gfortran...
- Index(es):
Relevant Pages
|