Check input device is a terminal: Difference between revisions

→‎{{header|Julia}}: A new entry for Julia
(→‎{{header|Julia}}: A new entry for Julia)
Line 116:
> hello </dev/null
Who are you? You're not a terminal.
</pre>
 
=={{header|Julia}}==
<lang Julia>
if isa(STDIN, Base.TTY)
println("This program sees STDIN as a TTY.")
else
println("This program does not see STDIN as a TTY.")
end
</lang>
 
{{out}}
<pre>
This program sees STDIN as a TTY.
</pre>