Topic: Trying to replace Pause statement

In order to check the progress of my code, I use  a print statement followed by a Read statement
that should halt execution and wait for a key press.
Print *, " Begin Pass 56 on 20 Jan 2018  Enter any key then press enter"
always  halts execution
But further on in the code:

Print *, " Does this line appear after the grid is displayed ?"

Does not halt execution.

Also, I think the Pause statement is deprecated ?


Re: Trying to replace Pause statement


I believe the PAUSE statement was an extension as opposed to a standard, deprecated language feature.  Regardless, your code should be working.  In between these calls for reading from the console, do you ever access units 5 or 6?  If unit 5 or 6 is redefined to point at a file, it actually changes the standard input and output to that file, meaning your Read statement is actually reading from the file.  I would initially check that.  Units under 20 or so can be extremely dangerous to use since some compilers have hard-coded definition of these unit numbers.  Our compiler, for example, hard-codes the standard input and output to units 5 and 6.

You can also use the SLEEP function to slow things down at certain points.

Jeff Armstrong
Approximatrix, LLC