- #1
stupify
- 4
- 0
ok,
Been programing for awhile, come from a visual basic background.
We have a new server with newer compilers. Compiling with -f77 switch.
Seems the old software allowed passing of integers, and strings in a call statement. New compilers seems to be inconsistent in passing the values.Example:
call foo(0,'Hello','World')subroutine foo(x,a,b)
integer x
character*(*) a
character*(*) b
if(x.eq.1) then
print *, a
else
print *, b
end if
return
end
Seems to not pass integer 0 to variable x.
Any thoughts. I have read that fortran passes by reference, not value; maybe someone can explain this to me.
Thnkx
Been programing for awhile, come from a visual basic background.
We have a new server with newer compilers. Compiling with -f77 switch.
Seems the old software allowed passing of integers, and strings in a call statement. New compilers seems to be inconsistent in passing the values.Example:
call foo(0,'Hello','World')subroutine foo(x,a,b)
integer x
character*(*) a
character*(*) b
if(x.eq.1) then
print *, a
else
print *, b
end if
return
end
Seems to not pass integer 0 to variable x.
Any thoughts. I have read that fortran passes by reference, not value; maybe someone can explain this to me.
Thnkx