Anonymous user
Check input device is a terminal: Difference between revisions
Check input device is a terminal (view source)
Revision as of 20:14, 19 September 2014
, 9 years ago→{{header|Crystal}}
(Added Crystal version) |
|||
Line 67:
=={{header|Crystal}}==
<lang ruby>File.new("testfile").tty? #=> false
File.new("/dev/tty").tty? #=> true
STDIN.tty? #=> true</lang>
=={{header|D}}==
|