I have been experimenting with the following code:
program hello
write(*,"(i9)") 10
end program hello
and varying the format string, trying to make write output a string just the size needed to represent the integer number, but so far I was unable to manage it. How to write 'fit' integers in Fortran?