I am trying to replicate the formatting from a Fortran code output in Julia. Here is a MWE.
program formattest
implicit none
integer:: iyd
real(4):: d(4),t
iyd = 10000
d = 9.999e-38
t = 1.053e10
open(77,file='outputtest.txt',status='replace')
write(77,'(i7,4e13.4,f8.2)') &
iyd,d(1:4),t
close(77)
end program
The 9.999E-38 is something special put in the original code so there is no way around it and I already tried to use Printf but I don’t see any way to print it as 0.9999E-37 instead of 9.999E-38
You would need to install PyCall with a Python environment that has the fortranformat package installed. The details on how to do that depend on what OS you are using and whether you already have a Python environment installed.
I want to be able to use diff in the command line for the Fortran output and the Julia output to compare them quickly instead of having to read in the Fortran output and compare both outputs in a Julia code