Task

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



Related task

   Check input device is a terminal


 
(define (isatty? fd) (syscall 16 fd 19))
(print (if (isatty? stdout)
   "stdout is a tty."
   "stdout is not a tty."))
 