Did you know that...? Fortran gotchas thread

· Fortran Lang Discourse · Nov. 29, 2026, 6:40 p.m.
Summary
The blog post discusses the complexities and potential pitfalls of using functions in Fortran's WRITE() statements, particularly concerning nested and recursive I/O. It highlights common issues such as hangs or segmentation faults that can occur, provides techniques to handle them, and shares the author's personal experiences with compiler behavior regarding recursive I/O. The author emphasizes the importance of using scratch variables to mitigate risks, improving the reliability of output when calling functions within I/O statements.