Anonymous user
Hostname: Difference between revisions
→{{header|OCaml}}: ++ GNU Octave
m (→{{header|Matlab}}: Case, whitespace) |
(→{{header|OCaml}}: ++ GNU Octave) |
||
Line 152:
=={{header|OCaml}}==
<lang ocaml>Unix.gethostname()</lang>
=={{header|Octave}}==
Similarly to [[Discover the Hostname#MATLAB|MATLAB]], we could call system command <tt>hostname</tt> to know the hostname. But we can also call the internal function <tt>uname()</tt> which returns a structure holding several informations, among these the hostname (nodename):
<lang octave>
uname().nodename
</lang>
=={{header|Perl}}==
|