Task

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



Related task

   Check input device is a terminal


import std.stdio;
 
extern(C) int isatty(int);
 
void main() {
    writeln("Stdout is tty: ", stdout.fileno.isatty == 1);
}