DFPORT. STMicroelectronics PGI
Quảng cáo
Quảng cáo
Chapter 23. Fortran Module/Library Interfaces for Windows
Routine
runqq setenvqq
Result
INTEGER*2
LOGICAL*4 setfileaccessqq LOGICAL*4 setfiletimeqq signalqq sleepqq splitpathqq systemqq
LOGICAL*4
INTEGER*8
None
LOGICAL*4
LOGICAL*4 unpacktimeqq Multiple
INTEGERS
Description
Calls another program and waits for it to execute.
Sets the values of an existing environment variable or adds a new one.
Sets the file access mode for the specified file.
Sets the modification time for the specified file.
Controls signal handling.
Delays execution of the program for a specified time.
Breaks a full path into components.
Executes a command by passing a command string to the operating system’s command interpreter.
Unpacks a file’s packed time and date value into its component parts.
DFPORT
The following table lists the functions that
DFPORT
includes. In the table
[Generic]
refers to a generic
.
Routine
abort access alarm besj0 besj1 besjn besy0 besy1 besyn chdir
Result
None
INTEGER*4
INTEGER*4
REAL*4
REAL*4
REAL*4
REAL*4
REAL*4
REAL*4
INTEGER*4
Table 23.3. DFPORT Functions
Description
Immediately terminates the program. If the operating systems supports a core dump, abort produces one that can be used for debugging.
Determines access mode or existence of a file.
Executes a routine after a specified time.
Computes the BESSEL function of the first kind of order 0 of
X, where X is real.
Computes the BESSEL function of the first kind of order 1 of
X, where X is real.
Computes the BESSEL function of the first kind of order N of X, where N is an integer and X is real.
Computes the BESSEL function of the second kind of order
0 of X, where X is real.
Computes the BESSEL function of the second kind of order
1 of X, where X is real.
Computes the BESSEL function of the second kind of order
N of X, where N is an integer and X is real.
Changes the current directory to the directory specified.
Returns 0, if successful or an error
389
Using DFLIB and DFPORT dbesj1 dbesjn dbesy0 dbesy1 dbesyn derf derfc dffrac dflmax dflmin drandm dsecnds dtime erf
Routine
chmod ctime date dbesj0
Result
STRING
REAL*8
Description
INTEGER*4 Changes the mode of a file by setting the access permissions of the specified file to the specified mode. Returns 0 if successful, or error
STRING(24) Converts and returns the specified time and date as a string.
Returns the date as a character string: dd-mm-yy.
Computes the double-precision BESSEL function of the first kind of order 0 of X, where X is a double-precision argument.
REAL*8
REAL*8
REAL*8
REAL*8
REAL*8
REAL*8
REAL*8
REAL*8
REAL*8
REAL*8
REAL*8
REAL*8
REAL*4
REAL*4
Computes the double-precision BESSEL function of the first kind of order 1 of X, where X is a double-precision argument.
Computes the double-precision BESSEL function of the first kind of order N of X, where N is an integer and X is a double-precision argument.
Computes the double-precision BESSEL function of the second kind of order 0 of X, where X, where X is a doubleprecision argument.
Computes the double-precision BESSEL function of the second kind of order 1 of X, where X, where X is a doubleprecision argument.
Computes the double-precision BESSEL function of the second kind of order N of X, where N is an integer and X, where X is a double-precision argument.
Computes the double-precision error function of X, where
X is a double-precision argument.
Computes the complementary double-precision error function of X, where X is a double-precision argument.
Returns fractional accuracy of a REAL*8 floating-point value.
Returns the maximum positive REAL*8 floating-point value.
Returns the minimum positive REAL*8 floating-point value.
Generates a REAL*8 random number.
Returns the number of real time seconds since midnight minus the supplied argument value.
Returns the elapsed user and system time in seconds since the last call to dtime.
Computes the error function of X, where X is Real.
390
ftell ftell64 gerror getarg getc getcwd fseek fseek64 fstat fstat64 fdate ffrac fgetc flmax flmin flush fputc free
Routine
erfc etime exit
Chapter 23. Fortran Module/Library Interfaces for Windows
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*8
STRING
STRING
INTEGER*4
INTEGER*4
Result
REAL
REAL*4
None
STRING
REAL*4
INTEGER*4
REAL*4
REAL*4
None
INTEGER*4
None
Description
Computes the complementary error function of X, where X is Real.
Returns the elapsed time in seconds since the start of program execution.
Immediately terminates the program and passes a status to the parent process.
Returns the current date and time as an ASCII string.
Returns the fractional accuracy of a REAL*4 floating-point value.
Gets a character or word from an input stream. Returns the next byte or and integer
Returns the maximum positive REAL*4 floating-point value.
Returns the minimum positive REAL*4 floating-point value.
Writes the output to a logical unit.
Writes a character or word from an input stream to a logical unit. Returns 0 if successful or an error.
Frees memory previously allocated by MALLOC(). Intended for users compiling legacy code. Use DEALLOCATE for newer code.
Repositions the file pointer associated with the specified file. Returns 0 if successful, 1 otherwise.
Repositions the file pointer associated with the specified stream. Returns 0 if successful, 1 otherwise.
Returns file status information about the referenced open file or shared memory object.
Returns information in a 64-bit structure about the referenced open file or shared memory object.
Returns the current value of the file pointer associated with the specified stream.
Returns the current value of the file pointer associated with the specified stream.
Writes system error messages.
Returns the list of parameters that were passed to the current process when it was started.
Retrieves the character at the front of the specified character list, or -1 if empty
Retrieves the pathname of the current working directory or null if fails.
391
irand1 irand2 irandm isatty itime kill link
Using DFLIB and DFPORT hostnm iargc idate ierrno inmax ioinit
Routine
getenv getfd getgid getlog getpid getuid gmtime
Result
INTEGER*4
INTEGER*4
STRING
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
None
INTEGER*4
INTEGER*4
INTEGER*4
LOGICAL numerical form of time
INTEGER*4
INTEGER*4
Description
Returns the value of the specified environment variable(s).
Returns the file descriptor associated with a Fortran logical unit.
Returns the numerical group ID of the current process.
Stores the user’s login name in NAME. If the login name is not found, then NAME is filled with blanks.
Returns the process numerical identifier of the current process.
Returns the numerical user ID of the current process.
Converts and returns the date and time formats to GM
(Greenwich) time as month, day, and so on.
Sets or Gets the name of the current host. If setting the hostname, returns 0 if successful, errno if not.
Returns an integer representing the number of arguments for the last program entered on the command line.
Returns the date in numerical form, day, month, year.
Returns the system error number for the last error.
Returns the maximum positive integer value.
Establishes the properties of file I/O for files opened after the call to ioinit, such as whether to recognize carriage control, how to treat blanks and zeros, and whether to open files at the beginning or end of the file.
Generates pseudo-random integer in the range of 0 through
(2**31)-1, or (2**15)-1 if called with no argument.
Generates pseudo-random integer in the range of 0 through
(2**31)-1, or (2**15)-1 if called with no argument.
Generates pseudo-random integer in the range of 0 through
(2**31)-1, or (2**15)-1 if called with no argument.
Finds the name of a terminal port. Returns TRUE if the specified unit is a terminal.
Fills and returns TARRAY with numerical values at the current local time, with elements 1,2,and 3 of TARRY being the hour (1-24), minute (1-60) and seconds (1-60).
Sends the specified signal to the specified process or group of processes. Returns 0 if successful, -1 otherwise
Creates an additional directory entry for the specified existing file.
392
outstr perror putc putenv qsort rand1 rand2 random rename
Routine
lnblnk loc long lstat lstat64 ltime malloc mclock
Chapter 23. Fortran Module/Library Interfaces for Windows
Result
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
Array of
INTEGER*4
INTEGER*8
INTEGER*4
INTEGER*4
None
INTEGER*4
INTEGER*4
INTEGER*4
REAL*4
REAL*4
REAL*4
INTEGER*4
Description
Returns the position of the last non-blank string character in the specified string.
Returns the address of an object.
Converts INTEGER*2 to INTEGER*4
Obtains information about the referenced open file or shared memory object in a large-file enables programming environment.
Obtains information in a 64-bit structure about the referenced open file or shared memory object in a largefile enables programming environment.
Converts the system time from seconds into TARRAY, which contains GMT for the current local time zone.
Allocates SIZE byes of dynamic memory, returning the address of the allocated memory. Intended for users compiling legacy code. Use ALLOCATE for newer code.
Returns time accounting information about the current process and its child processes in 1/100 or second units of measure. The returned value is the sum of the current process’s user time and system time of all child processes.
Outputs the value of the specified character to the standard output file.
Writes a message to standard error output the describes the last error encountered by a system call or library subroutine.
Puts the specified character at the end of the character list.
Sets the value of the specified environment variable or creates a new environment variable.
Uses quick-sort algorithm to sort a table of data.
Provides a method for generating a random number that can be used as the starting point for the rand procedure.
Provides a random value between 0 and 1, which is generated using the specified seed value, and computed for each returned row when used in the select list.
Uses a non-linear additive feedback random-number generator to return pseudo-random numbers in the range of 0 to (2
31
-1)
Renames the specified directory or file
393
stime symlnk system time timef srand1 srand2 stat stat64 times ttynam unlink wait
Using DFLIB and DFPORT
Routine
rindex rtc secnds short signal sleep
Result
INTEGER*4
Description
Returns the index of the last occurrence of a specific string of characters in a specified string.
REAL*8
REAL*4
Returns the real-time clock value expressed as a number of clock ticks.
Gets the time in seconds from the real-time system clock.
If the value is zero, the time in seconds from midnight is used.
Converts INTEGER*4 to INTEGER*2.
INTEGER*2
INTEGER*4
None
None
None
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4
Specifies the action to take upon delivery of a signal.
Puts the calling kernel thread to sleep, requiring it to wait for a wakeup to be issued to continue to run. Provided for compatibility with older code and should not be used with new code.
Sets the seed for the pseudo-random number generation that rand1 provides.
Sets the seed for the pseudo-random number generation that rand2 provides.
Obtains information about the specified file.
Obtains information in a 64-bit structure about the specified file.
Sets the current value of the specified parameter for the system-wide timer.
Creates a symbolic link with the specified name to the specified file.
Runs a shell command.
INTEGER*4
INTEGER*4
REAL*8
Returns the time in seconds since January 1, 1970.
Returns the elapsed time in milliseconds since the first call to timef.
INTEGER*4 Fills the specified structure with time-accounting information.
STRING(100) Either gets the path name of the terminal or determines if the device is a terminal.
INTEGER*4 Removes the specified directory entry, and decreases the link count of the file referenced by the link.
Suspends the calling thread until the process receives a signal that is not blocked or ignored, or until the calling process’ child processes stop or terminate.
394
Tải xuống
Quảng cáo