Re: getting env. variables in gfortran...



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/
.



Relevant Pages

  • Re: Reinitialising random number generator
    ... exmaple in the gfortran documentation. ... The example shown in the documentation is specific to gfortran, ... be needed with other implementations). ... He said the seeding method is standard f95, so it can be used portably. ...
    (comp.lang.fortran)
  • getting env. variables in gfortran...
    ... 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... ...
    (comp.lang.fortran)
  • Re: Using user defined type in Fortan 77 subroutines
    ... 60 DDOT = DTEMP ... gfortran -c DNAD.f90 ... when I compile blas.for using ... regardless of whether the standard allows the ...
    (comp.lang.fortran)
  • Re: Difficult example?
    ... > has a bug with its LOGICALtype and kind. ... if there were a gfortran compiler I could download I ... compile and run it, then compile and run the resulting ... You could wipe out all the subroutines except for ...
    (comp.lang.fortran)
  • Re: Can somebody Help me??
    ... compile the code with Portland Group f90 or hpf compiler. ... ifexit ... And, if, as you indicate it's taken by the other compilers it seems there's something wrong w/ the version of gfortran you're using on a very superficial reading. ... but OP does not mind for he uses Portland Group compiler in general and just checks compatiblity with gfortran when needed. ...
    (comp.lang.fortran)