Intel® Fortran Compiler 17.0 Developer Guide and Reference
Portability Function: Returns the current host computer name. This function can also be specified as HOSTNM.
USE IFPORT
result = HOSTNAM (name)
name |
(Output) Character*(*). Name of the current host. Should be at least as long as MAX_HOSTNAM_LENGTH + 1. MAX_HOSTNAM_LENGTH is defined in the IFPORT module. |
The result type is 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.
use IFPORT
character(MAX_HOSTNAM_LENGTH + 1) hostnam
integer(4) istat
ISTAT = HOSTNAM (hostname)