Silverfrost Forums

Welcome to our forums

A run time error

12 Feb 2021 10:56 #27091

Hello,

My main program contains a call-back from which is called a subroutine, which is placed in my MODULE. The code for the call-back is as follows:

...
INTEGER FUNCTION vektor_graf()
    USE CLRWIN
    USE modul_mm_mk
    IMPLICIT NONE
    INTEGER K

     call ENABLE_UTF8@(1)

     CALL TRASA_OK_POCET_RIADKOV (K)

     vektor_graf = 1

END FUNCTION vektor_graf
...

The called subroutine checks (among other things) the availability of a required external file. I intentionally removed the external file to see whether the called subroutine will issue a warning that the required file is missing as I coded it. The subroutine uses a call-back assigned to the STOP button which is in the warning window.

I get the warning message (dialog) as expected, but when I press the STOP button on the warning dialog, I get the following run-time error:

https://i.postimg.cc/gj1s4W8t/run-time.jpg

Where could be a problem?

Martin

13 Feb 2021 8:18 #27092

Martin

I would need more details to know exactly but this looks like it is caused by recursive IO. An call to an IO routine is calling an IO routine within itself. FTN95 does not permit recursive IO.

13 Feb 2021 10:32 #27094

Thanks Paul, you are right!

I changed the code and now it works.

Martin

Please login to reply.