Visible to Intel only — GUID: GUID-E2E955F7-8A3A-4242-874B-FCC5BA4E2F4C
Visible to Intel only — GUID: GUID-E2E955F7-8A3A-4242-874B-FCC5BA4E2F4C
Portability Library Routines
The following tables list library routines for portability.
If you have programs that use these routines, it is recommended that they access the portability library with USE IFPORT.
Some routines in this library can be called with different sets of arguments, and some can be used as a function or a subroutine. In these cases, the arguments and calling mechanism determine the meaning of the routine. The IFPORT module contains generic interface blocks that give procedure definitions for these routines.
Fortran contains intrinsic procedures for many of the portability functions. The portability routines are extensions to the Fortran 2018 standard. For portability and performance, you should write code using Fortran standard intrinsic procedures whenever possible.
Name |
Procedure Type |
Description |
---|---|---|
Function |
Returns the version of the Fortran runtime library (ifcore). |
|
Function |
Returns the version of the Fortran portability library (ifport). |
|
Function |
Returns information about a logical file unit. |
|
Function |
Returns the pathname of the current working directory. |
|
Subroutine |
Searches the environment for a given string and returns its value if found. |
|
Function |
Returns the group ID of the user. |
|
Subroutine |
Returns the user's login name. |
|
Function |
Returns the process ID of the process. |
|
Function |
Returns the user ID of the user of the process. |
|
Function |
Returns the name of the user's host. |
|
Function |
Checks whether a logical unit number is a terminal. |
|
Function |
Returns information about a named file. STAT is the preferred form of this function. |
|
Function |
Renames a file. |
|
Function |
Returns information about a named file. |
|
Function |
Deletes the file given by path. |
Name |
Procedure Type |
Description |
---|---|---|
Subroutine |
Stops execution of the current process, clears I/O buffers, and writes a string to external unit 0. |
|
Function |
Executes an external subroutine after waiting a specified number of seconds. |
|
Function |
Sends a signal code to the process given by ID. |
|
Function |
Changes the action for signal. |
|
Subroutine |
Suspends program execution for a specified number of seconds. |
|
Function |
Executes a command in a separate shell. |
Name |
Procedure Type |
Description |
---|---|---|
Functions |
Return single-precision values of Bessel functions of the first and second kind of orders 1, 2, and n, respectively. |
|
Subroutines |
Perform bit level clear, set, and test for integers. |
|
Function |
Performs bit level clear, set, and test for integers. |
|
Function |
Converts a COMPLEX(4) argument to DOUBLE PRECISION type. |
|
Functions |
Return a BIT-WISE complement or logical .NOT. of the argument. |
|
Function |
Performs an effective BIT-WISE store under mask. |
|
Functions |
Return double-precision values of Bessel functions of the first and second kind of orders 1, 2, and n, respectively. |
|
Functions |
Convert an integer to double-precision real type. |
|
Functions |
Return random numbers between 0.0 and 1.0. |
|
Subroutine |
Sets the seed for the random number generator. |
|
Function |
Converts an INTEGER(4) argument to double-precision real type. |
|
Functions |
Convert an integer to single-precision real type. |
|
Function |
Returns the maximum positive value for an integer. |
|
Function |
Converts an INTEGER(4) argument to INTEGER(2) type. |
|
Functions |
Return a positive integer in the range 0 through 2**31-1 or 2**15-1 if called without an argument. |
|
Subroutine |
Returns the current seed. |
|
Subroutine |
Sets the seed for the random number generator. |
|
Function |
Computes an absolute value. |
|
Function |
Converts an INTEGER(2) argument to INTEGER(4) type. |
|
Subroutine |
Sets the seed for a sequence of pseudo-random numbers. |
|
Functions |
Return random values in the range 0 through 1.0. |
|
Function |
Generates a random number between 0.0 and RAND_MAX. |
|
Subroutine |
Returns the current seed. |
|
Subroutine |
Sets the seed for the random number generator. |
|
Subroutine |
Changes the starting point of RANDOM. |
|
Function |
Converts an INTEGER(4) argument to INTEGER(2) type. |
|
Subroutine |
Seeds the random number generator used with IRAND and RAND. |
Name |
Procedure Type |
Description |
---|---|---|
Function |
Checks a file for accessibility according to mode. |
|
Function |
Changes file attributes. |
|
Function |
Reads a character from an external unit. |
|
Function |
Flushes the buffer for an external unit to its associated file. |
|
Function |
Writes a character to an external unit. |
|
Subroutine |
Repositions a file on an external unit. |
|
Function |
Return the offset, in bytes, from the beginning of the file. |
|
Function |
Reads a character from unit 5. |
|
Functions |
Return the offset, in bytes, from the beginning of the file. |
|
Function |
Writes a character to unit 6. |
Name |
Procedure Type |
Description |
---|---|---|
Function |
Returns current time in HH:MM:SS format using a 24-hour clock. |
|
Subroutine |
Returns the processor clock to the nearest microsecond. |
|
Function |
Converts system time to a 24-character ASCII string. |
|
Subroutine or Function |
Returns the current system date. |
|
Subroutine |
Returns the current system date. |
|
Function |
Returns the elapsed time in seconds since the start of the current process. |
|
Function |
Returns CPU time since later of (1) start of program, or (2) most recent call to DTIME. |
|
Function |
Returns elapsed CPU time since the start of program execution. |
|
Subroutine or Function |
Returns the current date and time as an ASCII string. |
|
Subroutine |
Returns the date. |
|
Subroutine |
Returns the time. |
|
Subroutine |
Returns Greenwich Mean Time as a 9-element integer array. |
|
Subroutine |
Returns the date either as one 3-element array or three scalar parameters (month, day, year). |
|
Subroutine |
Returns the date either as one 3-element array or three scalar parameters (month, day, year). |
|
Subroutine |
Returns current time as a 3-element array (hour, minute, second). |
|
Function |
Returns current date as an 8-character string with the Julian date. |
|
Function |
Returns current date as a 10-character string with the Julian date. |
|
Subroutine |
Returns local time as a 9-element integer array. |
|
Function |
Returns number of seconds since 00:00:00 GMT, Jan 1, 1970. |
|
Function |
Returns number of seconds since midnight, less the value of its argument. |
|
Function |
Sets the date. |
|
Function |
Sets the time. |
|
Subroutine or Function |
As a subroutine, returns time formatted as HH:MM:SS; as a function, returns time in seconds since 00:00:00 GMT, Jan 1, 1970. |
|
Function |
Returns the number of seconds since the first time this function was called (or zero). |
Name |
Procedure Type |
Description |
---|---|---|
Function |
Returns the last error set. |
|
Function |
Returns the last error set by a runtime function or subroutine. |
|
Function |
Returns the last code error. |
|
Subroutine |
Sets the mode for handling critical errors. |
Name |
Procedure Type |
Description |
---|---|---|
Function |
Sends an interrupt to the executing program, simulating an interrupt from the operating system. |
|
Function |
Calls another program and waits for it to execute. |
|
Function |
Controls signal handling. |
|
Subroutine |
Delays execution of the program for the specified time. |
Name |
Procedure Type |
Description |
---|---|---|
Function |
Changes the current working directory. |
|
Function |
Makes the specified directory the current (default) directory. |
|
Function |
Makes the specified drive the current drive. |
|
Function |
Deletes a specified directory. |
|
Function |
Returns the current drive and directory path. |
|
Function |
Gets the size of the specified drive. |
|
Function |
Reports the drives available to the system. |
|
Function |
Gets a value from the current environment. |
|
Function |
Makes a directory with the specified directory name. |
|
Function |
Adds a new environment variable, or sets the value of an existing one. |
|
Function |
Executes a command by passing a command string to the operating system's command interpretor. |
Name |
Procedure Type |
Description |
---|---|---|
Subroutine |
Sounds the speaker for a specified duration in milliseconds at a specified frequency in Hertz. |
Name |
Procedure Type |
Description |
---|---|---|
Function |
Deletes the specified files in a specified directory. |
|
Function |
Searches for a file in the directories specified in the PATH environment variable. |
|
Function |
Returns the full path for a specified file or directory. |
|
Function |
Returns information about files with names that match a request string. |
|
Subroutine |
Packs time values for use by SETFILETIMEQQ. |
|
Function |
Renames a file. |
|
Function |
Sets file-access mode for the specified file. |
|
Function |
Sets modification time for a given file. |
|
Function |
Breaks a full path into four components. |
|
Subroutine |
Unpacks a file's packed time and date value into its component parts. |
Name |
Procedure Type |
Description |
---|---|---|
Function |
Performs a binary search for a specified element on a sorted one-dimensional array of non-structure data types (derived types are not allowed). |
|
Subroutine |
Sorts a one-dimensional array of non-structure data types (derived types are not allowed). |
Name |
Procedure Type |
Description |
---|---|---|
Subroutine |
Clears the exception flags in the floating-point processor status word. |
|
Subroutine |
Returns the value of the floating-point processor control word. |
|
Subroutine |
Returns the value of the floating-point processor status word. |
|
Subroutine |
Same as SETCONTROLFPQQ. |
|
Subroutine |
Same as GETCONTROLFPQQ. |
|
Subroutine |
Sets the value of the floating-point processor control word. |
|
Subroutine |
Same as GETSTATUSFPQQ. |
Name |
Procedure Type |
Description |
---|---|---|
Function |
Sets, gets, or clears IEEE flags. |
|
Function |
Establishes a handler for IEEE exceptions. |
Name |
Procedure Type |
Description |
---|---|---|
Function |
Cancels any I/O in progress to the specified port. |
|
Function |
Establishes the connection to a serial port and defines certain usage parameters. |
|
Function |
Establishes the connection to a serial port, defines certain usage parameters, and defines the size of the internal buffer for data reception. |
|
Function |
Returns the Windows* handle associated with the communications port. |
|
Function |
Returns the baud rate, parity, data bits, and stop bit settings of the communications port. |
|
Function |
Returns the baud rate, parity, data bits setting, stop bits, and other settings of the communications port. |
|
Function |
Returns the user selectable timeouts for the serial port. |
|
Function |
Returns information about the availability of input data. |
|
Function |
Returns information about the availability of input records. |
|
Function |
Executes a purge function on the specified port. |
|
Function |
Reads available data from the port specified. |
|
Function |
Reads a record from the port specified. |
|
Function |
Releases a serial port that has previously been connected. |
|
Function |
Sets the baud rate, parity, data bits and stop bit settings of the communications port. |
|
Function |
Sets the baud rate, parity, data bits setting, stop bits, and other settings of the communications port. |
|
Function |
Sets the user selectable timeouts for the serial port. |
|
Function |
Displays the state of a port. |
|
Function |
Executes a communications function on a specified port. |
|
Function |
Outputs data to a specified port. |
|
Function |
Outputs data to a specified port and follows it with a record terminator. |
Name |
Procedure Type |
Description |
---|---|---|
Function |
Returns the index of the last non-blank character in a string. |
|
Subroutine |
Returns a sorted version of a one-dimensional array of a specified number of elements of a named size. |
|
Function |
Returns the index of the last occurrence of a substring in a string. |
|
Subroutine |
Scans the environment for the value of an environment variable. |
|
Subroutine |
Checks whether a logical unit is a terminal. |
1 This routine can also be specified as HOSTNM.
2 There is also a RANDOM subroutine in the portability library.
3 The two-digit year return value of DATE, IDATE, and JDATE may cause problems with the year 2000. Use the intrinsic subroutine DATE_AND_TIME instead.
4 Windows