Why is it that if I do this:
but if I do this
I segfault?
I understand passing by reference, but why can't I simply manipulate ISTART as a local variable when I pass the 7 by value?
Code:
IMPLICIT DOUBLE PRECISION (A-H, O-Z) IMPLICIT INTEGER(I-N) ISTART=7 I = IRCON(ISTART) RETURN END INTEGER FUNCTION IRCON(ISTART) IMPLICIT DOUBLE PRECISION (A-H, O-Z) IMPLICIT INTEGER(I-N) ISTART=5 RETURN END
Code:
IMPLICIT DOUBLE PRECISION (A-H, O-Z) IMPLICIT INTEGER(I-N) I = IRCON(7) RETURN END INTEGER FUNCTION IRCON(ISTART) IMPLICIT DOUBLE PRECISION (A-H, O-Z) IMPLICIT INTEGER(I-N) ISTART=5 RETURN END
I understand passing by reference, but why can't I simply manipulate ISTART as a local variable when I pass the 7 by value?
Comment