Check input device is a terminal: Difference between revisions
Content added Content deleted
imported>CyD (Added Forth entry.) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
Line 519: | Line 519: | ||
=={{header|Wren}}== |
=={{header|Wren}}== |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">import "io" for Stdin |
||
System.print("Input device is a terminal? %(Stdin.isTerminal ? "Yes" : "No")")</syntaxhighlight> |
System.print("Input device is a terminal? %(Stdin.isTerminal ? "Yes" : "No")")</syntaxhighlight> |
||
Line 527: | Line 527: | ||
Input device is a terminal? Yes |
Input device is a terminal? Yes |
||
</pre> |
</pre> |
||
=={{header|zkl}}== |
=={{header|zkl}}== |
||
On Unix, check to see if stdin's st_mode is a character device. |
On Unix, check to see if stdin's st_mode is a character device. |