Sign in Join
FPDoc Onlineexperiment

GetHostName function

In unit Unix

Return host name.

Declaration

pascal
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

Example: ex40

pascal
Program Example40;

{ Program to demonstrate the GetHostName function. }

Uses unix;

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

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.