function fget(chr) c get a key from the keyboard implicit none c output c status, 0 on success, -1 on end of file, or error code integer fget c character character*1 chr c local c whether we were initialized integer init save init data init/0/ c executable call fgetc(5,chr,fget) end