getenv implementation?
Steve Kargl
sgk@troutmask.apl.washington.edu
Sun Aug 29 23:16:00 GMT 2004
On Mon, Aug 30, 2004 at 01:00:50AM +0200, Tobias Schl?ter wrote:
> Try this:
>
> Steve Kargl wrote:
> > character*7 name, value
> ^^^
Cut and paste. :-)
program aa
character*70 name, value
name = 'DISPLAY'
call getenv(name,value)
print*, 'name = ', name
print*, 'value = ', value
print*, getenv(name)
end
> :-) Looks like a bug that's easily missed & easily fixed. Now how does g77
> deal with environment variables with spaces in their names? :-)
I don't know. All my environment variables have no spaces, but
a quick test shows that it doesn't do what you expect.
More importantly, gfortran appears to be broken.
> BTW I added a chapter on language extensions to the manual today. Can you
> carry over the sections from the g77 manual for the functions you added?
I'll look at it.
--
Steve
More information about the Fortran
mailing list