Task

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



Related task

   Check output device is a terminal


void main()
{
    if(Stdio.Terminfo.is_tty())
	write("Input comes from tty.\n");
    else
        write("Input doesn't come from tty.\n");
}