Check output device is a terminal: Difference between revisions
Content added Content deleted
(Add COBOL) |
|||
Line 419: | Line 419: | ||
Other |
Other |
||
</lang> |
</lang> |
||
=={{header|Phix}}== |
|||
Requires 0.8.2+ |
|||
<lang Phix>printf(1,"stdin:%t, stdout:%t, stderr:%t\n",{isatty(0),isatty(1),isatty(2)})</lang> |
|||
{{out}} |
|||
<pre> |
|||
C:\Program Files (x86)\Phix>p test |
|||
stdin:true, stdout:true, stderr:true |
|||
C:\Program Files (x86)\Phix>p test > test.txt; type test.txt |
|||
stdin:true, stdout:false, stderr:true |
|||
C:\Program Files (x86)\Phix>p test 2> test.txt |
|||
stdin:true, stdout:true, stderr:false |
|||
</pre> |
|||
=={{header|PHP}}== |
=={{header|PHP}}== |