Anonymous user
Check output device is a terminal: Difference between revisions
m
→{{header|OCaml}}: lighter syntax
(added ocaml) |
m (→{{header|OCaml}}: lighter syntax) |
||
Line 33:
<lang ocaml>let () =
print_endline
if Unix.isatty Unix.stdout
then "Output goes to tty."
else "Output doesn't go to tty."
Testing in interpreted mode:
|