Hey,
Thanks for the response. I figured out how to use the subroutine to return multiple variables and at the same time make sure that any other variables outside are not affected.
First I made sure that I used different name place-holders within the subroutine.
Second I used intent to...
Also, there are case in my MATLAB program where I pass a variable as an argument and the argument itself gets modified and comes out as a modified argument.
So the argument and the variable returned are the same.
Can something like this be performed in fortran?
Thanks
Aditya
Thanks. That did occur to me. but another freedom which MATLAB affords is internal variables. So I use a bunch of variables within a MATLAB function which do not get returned. Does a fortran subroutine online return the arguments which are passed to it or does it return all variables inside the...
Hey Guys,
I am converting my code from MATLAB to fortran. Now in MATLAB it is rather convenient to write a function which returns multiple variables.
I believe a function in fortran can return only one variable. I think a subroutine can return multiple variables. I was not able to find any...