I am learning Fortran 90/95, and the book I am using had a discussion about the influence of line printers on the format statement. According to the book, the program uses the first character of the line to decide the line's position relative to the previous line (i.e. '1' starts a new page, '0' skips a line, '+' overwrites the previous line, and ' ' or any other character writes the new line below the previous line). I compiled and ran a simple program in the console to test this, but did not observe this behavior.
program test
integer :: i = 123
character(13) :: hello = 'Hello, World!'
100 format ('0','Count = ',I3)
write (*,*) hello
write (*,100) i
end program
The output is
Hello, World!
0Count = 123
where I would have expected
Hello, World!
Count = 123
Does anyone know why this is? Is this a legacy feature that is not used in Fortran 90/95? Is it specific behavior for a print to the console? I would like to know when (if ever) I need to declare a special first character in the format statement when writing.
My compiler is Force 2.0.9, which I believe is based on gfortran. I am running it on Windows 7, and the console is PowerShell.
Thanks for the help!