I'm using Classic Eclipse 4.2.2 with the Photran plugin and cygwin's gfortran compiler on a Windows 7 Professional machine. If I remove 'call flush(6)' below, the program does not write to console until AFTER reading from std in:
program mult1
implicit none
integer :: i,j,k
!
!
! This program just multiplies two integers
! together.
!
!
write(*,*) 'Enter i,j: '
call flush(6)
read(*,*)i,j
k = i*j
write(*,*) 'The product is ', k
stop
end program mult1
Any thoughts or fixes?