Dynamic String Generation and C+±style Output in Fortran
by Marcus Mohr
arXiv 5 Sep 2024
Using standard components of modern Fortran we present a technique to dynamically generate strings with as little coding overhead as possible on the application side. Additionally we demonstrate how this can be extended to allow for output generation with a C++ stream-like look and feel.
The code is here and works with
AMD/AOCC flang 12.0.0
GNU gfortran 12.2.0
Intel/classic ifort 2021.11.1
Intel/OneAPI ifx 2024.0.2
Nvidia nvfortran 21.9-0