I have built the following program with both ifort (Intel) and g95 but
they yield different results:
program ex
implicit none
real(8) :: x
integer :: n
character(10) :: buff
do
write(6,'(a)',advance='no') '> '
read(5,*) buff
read(buff,*,err=900) x
write(6,'(2a)') 'Number:',trim(buff)
cycle
900 continue
write(6,'(2a)') 'Command:',trim(buff)
end do
end program ex
On the Intel version entering '+' results in 'Command:+' whereas with
the g95 version the result is 'Number:+'. I expected the Intel result
but perhaps the standard is ambiguous on this. Is this a g95 bug?
A second question: how do I enter a '/' character?
Thanks,
Simon Geard


|