Intel® Fortran Compiler 16.0 User and Reference Guide
Portability Subroutine: Returns the user's login name.
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.
use IFPORT character*20 username CALL GETLOG (username) print *, "You logged in as ",username