Fortran · Runtime error
What does Error 540: Array or substring subscript out of range mean in Fortran?
An indexing expression into an array or a character substring evaluated to a value smaller or larger than the bounds permitted.
An indexing expression into an array or a character substring evaluated to a value smaller or larger than the bounds permitted.
Check the index expression, including any computed offset, against the actual declared bounds of the array or the actual length of the string being sliced.