[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Unix' (#rtl)

GetHostName

Return host name

Declaration

Source position: unix.pp line 124

function GetHostName: string;

Description

Get the hostname of the machine on which the process is running. An empty string is returned if hostname is not set.

Errors

None.

See also

GetDomainName

  

Return current domain name

Example

Program Example40;

{ Program to demonstrate the GetHostName function. }

Uses unix;

begin
  Writeln ('Name of this machine is : ',GetHostName);
end.

Documentation generated on: Nov 14 2015