Check input device is a terminal: Difference between revisions

Content added Content deleted
(add Standard ML)
(added Ol)
Line 285: Line 285:
Input doesn't come from tty.
Input doesn't come from tty.
</pre>
</pre>

=={{header|Ol}}==
<lang scheme>
(define (isatty? fd) (syscall 16 fd 19))
(print (if (isatty? stdin)
"Input comes from tty."
"Input doesn't come from tty."))
</lang>


=={{header|Perl}}==
=={{header|Perl}}==