Anonymous user
Hostname: Difference between revisions
→{{header|Pascal}}: add example
No edit summary |
(→{{header|Pascal}}: add example) |
||
Line 302:
=={{header|Oz}}==
<lang oz>{System.showInfo {OS.getHostByName 'localhost'}.name}</lang>
=={{header|Pascal}}==
FreePascal has the unix unit with the function GetHostName:
<lang pascal>Program HostName;
uses
unix;
begin
writeln('The name of this computer is: ', GetHostName);
end.</lang>
Output example:
<pre>
The name of this computer is: MyComputer.local
</pre>
=={{header|Perl}}==
|