<ERROR STOP Example Program>
Program error_stop_example
Call test(13)
Call test(-27)
Contains
Subroutine test(n)
Integer,Intent(In) :: n
If (n<=0) Error Stop 'n must be positive'
Print *,'ok',n
End Subroutine
End Program
■ Execution Results
ok 13 ERROR STOP: n must be positive