- #1
thefury
- 7
- 0
I have a function that seems to be ignoring the first of 3 dummy variables. These variables are arrays with integer elements, should that be important.
For example, the call in the program is something like:
A = F(b,c,d)
and this transfers control to a function F, that is similar to:
x takes on the value of c, y takes on the value of d and any call to use z produces a segmentation fault.
Adding another dummy variable before b (i.e. A=F(e,b,d,c) ) solves the problem with seemingly no bad effects but I'd rather have a correct function instead!
This has been bugging me for about 2 hours now and any help would be appreciated!
For example, the call in the program is something like:
A = F(b,c,d)
and this transfers control to a function F, that is similar to:
Code:
FUNCTION F (x,y,z) RESULT (R)
IMPLICIT NONE
INTEGER :: x, y, z, R
...
operations
...
END FUNCTION F1
x takes on the value of c, y takes on the value of d and any call to use z produces a segmentation fault.
Adding another dummy variable before b (i.e. A=F(e,b,d,c) ) solves the problem with seemingly no bad effects but I'd rather have a correct function instead!
This has been bugging me for about 2 hours now and any help would be appreciated!