Next: , Previous: HostNm Intrinsic (subroutine), Up: Table of Intrinsic Functions


8.11.9.128 HostNm Intrinsic (function)

     HostNm(Name)

HostNm: INTEGER(KIND=1) function.

Name: CHARACTER; scalar; INTENT(OUT).

Intrinsic groups: unix.

Description:

Fills Name with the system's host name returned by gethostname(2), returning 0 on success or a nonzero error code (ENOSYS if the system does not provide gethostname(2)).

On some systems (specifically SCO) it might be necessary to link the “socket” library if you call this routine. Typically this means adding `-lg2c -lsocket -lm' to the g77 command line when linking the program.

For information on other intrinsics with the same name: See HostNm Intrinsic (subroutine).