Hi,
The help file suggests (to me) that this subroutine ought to work such that it is called repeatedly and only returns a key value if one is pressed, otherwise it does nothing. Perhaps I am wrong. Anyway, the following program:
program keyboardtest
implicit none
integer :: i
integer(kind=2) :: key
do i=1,1000000
write(*,*) i
call get_key_or_yield@(key)
key=0
if (key.ne.0) then
write(*,*) 'Key pressed with return value: ',key
end if
end do
end program keyboardtest
is supposed to loop over integers and display the key value each time a key is pressed. However, what actually happens is that the program prints '1' and then waits for me to press a key.
Have I simply misunderstood the use of the 'yield' in this routine's name?
Mark.