After running my program, I get the following run-time crash:
[
](https://postimages.org/)
The message above seems to me inexplicable, since I have all definitions needed.
In subroutine is the USE module declared as follows:
SUBROUTINE MAP ()
USE MSWIN
USE DX_DY
IMPLICIT NONE
...
print*,'X=',x(87312), 'Y=', y(87312),'DX=',dx(87312),'DY=',dy(87312)
x_min_mr = minval(x); PRINT*,'X_MIN_MR', x_min_mr
y_min_mr = minval(y); PRINT*,'Y_MIN_MR', y_min_mr
x_max_mr = maxval(x); PRINT*,'X_MAX_MR', x_max_mr
y_max_mr = maxval(y); PRINT*,'Y_MAX_MR', y_max_mr
pause
and also in the module:
MODULE DX_DY
USE MSWIN
IMPLICIT NONE
REAL*8 x_min_now, x_max_now, y_min_now, y_max_now, x_min_mr, x_max_mr, y_min_mr, y_max_mr
...
The run-time error declares that there is undefined variable (it points to the variables X_MAX_MR and Y_MAX_MR).
However, when I let PRINT them to the screen in the preceding line as print*,'X=',x(87312), 'Y=', y(87312),'DX=',dx(87312),'DY=',dy(87312), it prints out to the screen correct maximum values.
Even the commands
x_min_mr = minval(x); PRINT*,'X_MIN_MR', x_min_mr
y_min_mr = minval(y); PRINT*,'Y_MIN_MR', y_min_mr
are OK (the minimum values are correctly determined by the function MINVAL both for X and Y.
It fails with functions MAXVAL
x_max_mr = maxval(x); PRINT*,'X_MAX_MR', x_max_mr
y_max_mr = maxval(y); PRINT*,'Y_MAX_MR', y_max_mr
and writes the run-time error message above.
Has anyone a tip what´s wrong?
