Intel® Fortran Compiler 18.0 Developer Guide and Reference

GETLOG

Portability Subroutine: Returns the user's login name.

Module

USE IFPORT

CALL GETLOG (name)

name

(Output) Character*(*). User's login name.

The login name must be less than or equal to 64 characters. If the login name is longer than 64 characters, it is truncated. The actual parameter corresponding to name should be long enough to hold the login name. If the supplied actual parameter is too short to hold the login name, the login name is truncated.

If the login name is shorter than the actual parameter corresponding to name, the login name is padded with blanks at the end, until it reaches the length of the actual parameter.

If the login name cannot be determined, all blanks are returned.

Example

use IFPORT
character*20 username
CALL GETLOG (username)
print *, "You logged in as ",username