!=======================================================================-------- !()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()() !=======================================================================-------- ! These routines are available for general use. I ask that you send me ! interesting alterations that are available for public use; and that you ! include a note indicating the original author -- John S. Urban ! Last updated May 5th, 2009 !=======================================================================-------- !()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()() !=======================================================================-------- program test_getkey ! test program for debugging getkey(3F) and getkey(3C) character :: A character :: GETKEY icount=0 write(*,*)'begin striking keys to demonstrate interactive raw I/O mode' write(*,*)'q to quit; stops after 40 characters' do A=getkey() icount=icount+1 write(*,*)icount,' f90:key=',A,'->',ichar(A) if(icount.gt.40)stop if(A.eq.'q')stop enddo end program test_getkey character function getkey() ! call the C routine and convert the integer to a character integer getkey4F getkey=char(getkey4F()) !flush(6) ! usually not required, extension end function getkey