Let's say I have two subroutines
SUBROUTINE S2909
COMMON X,Y
X =2;
Y =3;
END
SUBROUTINE S2900
COMMON X,Y
//display X and Y
END
A COMMON block is used for sharing variables so does this mean if the value of X, Y that is updated in the subroutine S2909 will be same as in subroutine S2900?
From my understanding, yes, the variables are shared throughout the program. Their values will depend on the order with which the subroutines are called.
The following program
outputs