Check input device is a terminal: Difference between revisions
Content added Content deleted
(Add COBOL) |
(Add BaCon) |
||
Line 33: | Line 33: | ||
stdin is not a tty. |
stdin is not a tty. |
||
</pre> |
</pre> |
||
=={{header|BaCon}}== |
|||
<lang freebasic>terminal = isatty(0) |
|||
PRINT terminal</lang> |
|||
{{out}} |
|||
<pre>prompt$ bacon -q istty.bac |
|||
Converting 'istty.bac'... done, 4 lines were processed in 0.002 seconds. |
|||
Compiling 'istty.bac'... cc -c istty.bac.c |
|||
cc -o istty istty.bac.o -lm |
|||
Done, program 'istty' ready. |
|||
prompt$ ./istty |
|||
1 |
|||
prompt$ ./istty <<<"testing" |
|||
0</pre> |
|||
=={{header|C}}== |
=={{header|C}}== |