Task

Demonstrate how to check whether the input device is a terminal or not.



Related task

   Check output device is a terminal


 
(define (isatty? fd) (syscall 16 fd 19))
(print (if (isatty? stdin)
   "Input comes from tty."
   "Input doesn't come from tty."))
 