[comp.lang.fortran] need help doing peek-char from f77 FORTRAN on UNIX box

shaun@buengc.BU.EDU (Shaun Keller) (11/10/87)

Can someone fill me in on how to do single character input that doesn't
get hung up waiting for the character.  That is, it should be like
getc but not wait if the character isn't already there (i.e., peeking).
I'm running on an Encore Multimax if that is relevant (pretty standard
UNIX as Berkeley sees it).  I see that read(2) might be able to do it,
but I don't know how to interface to it.  Our FORTRAN library interfaces
to getc but doesn't talk about read.  -Shaun