HOSTNAM

Portability Function: Retrieves the current host computer name.

Module: USE DFPORT

Syntax

result = HOSTNAM (name)

name
(Output) Character*(*). Name of the current host. Should be at least as long as MAX_COMPUTERNAME_LENGTH, which is defined in the DFPORT module.

Results:

The result is of type INTEGER(4). The result is zero if successful. If name is not long enough to contain all of the host name, the function truncates the host name and returns -1.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

Example

use dfport
character*20 hostnam
integer(4) istat
ISTAT = HOSTNAM (hostname)