Intel® Fortran Libraries Reference

Intel® Fortran Libraries Reference Intel® Fortran Libraries Reference

h.eng.cam.ac.uk
from h.eng.cam.ac.uk More from this publisher
12.07.2015 Views

2 Intel Fortran Libraries ReferenceSyntaxCALL PXFWRITE (ifildes, buf, nbyte, nwritten, ierror)ifildes(Input) INTEGER(4). The file descriptor to be written to.buf(Input) Character. The buffer that contains the data to write into the file.nbyte(Input) INTEGER(4). The number of bytes to write.nwritten(Output) INTEGER(4). The returned number of bytes written.ierror(Output) INTEGER(4). The error status.If successful, ierror is set to zero; otherwise, an error code.The PXFWRITE subroutine writes nbyte bytes from the storage buf into a file specified by filedescriptor ifildes. The subroutine returns the total number of bytes read into nwritten. If no erroroccurs, the value of nwritten will equal the value of nbyte.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIBSee Also: “PXFREAD”QRANSETPortability Subroutine: Sets the seed for a sequence of pseudo-random numbers.Module: USE IFPORTSyntaxCALL QRANSET (rseed)rseed(Input) INTEGER(4). The reset value for the seed.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB2-362

Descriptions of the Library Routines 2QSORTPortability Subroutine: Performs a quick sort on an array of rank one.Module: USE IFPORTSyntaxCALL QSORT (array, len, isize, compar)array(Input) Any type. One-dimensional array to be sorted.If the data type does not conform to one of the predefined interfaces for QSORT, you may have tocreate a new interface (see the Note below).len(Input) INTEGER(4) on IA-32 processors; INTEGER(8) on Intel Itanium processors. Number ofelements in array.isize(Input) INTEGER(4) on IA-32 processors; INTEGER(8) on Intel Itanium processors. Size, inbytes, of a single element of array is:• 4 if array is of type REAL(4)• 8 if array is of type REAL(8) or complex• 16 if array is of type COMPLEX(8)compar(Input) INTEGER(2). Name of a user-defined ordering function that determines sort order. Thetype declaration of compar takes the form:INTEGER(2) FUNCTION compar (arg1, arg2)where arg1 and arg2 have the same type as array (above). Once you have created an orderingscheme, implement your sorting function so that it returns the following:• Negative if arg1 should precede arg2• Zero if arg1 is equivalent to arg2• Positive if arg1 should follow arg2Dummy argument compar must be declared as external.In place of an INTEGER kind, you can specify the constant SIZEOF_SIZE_T, defined inIFPORT.F90, for argument len or isize. Use of this constant ensures correct compilation.2-363

2 Intel <strong>Fortran</strong> <strong>Libraries</strong> <strong>Reference</strong>SyntaxCALL PXFWRITE (ifildes, buf, nbyte, nwritten, ierror)ifildes(Input) INTEGER(4). The file descriptor to be written to.buf(Input) Character. The buffer that contains the data to write into the file.nbyte(Input) INTEGER(4). The number of bytes to write.nwritten(Output) INTEGER(4). The returned number of bytes written.ierror(Output) INTEGER(4). The error status.If successful, ierror is set to zero; otherwise, an error code.The PXFWRITE subroutine writes nbyte bytes from the storage buf into a file specified by filedescriptor ifildes. The subroutine returns the total number of bytes read into nwritten. If no erroroccurs, the value of nwritten will equal the value of nbyte.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIBSee Also: “PXFREAD”QRANSETPortability Subroutine: Sets the seed for a sequence of pseudo-random numbers.Module: USE IFPORTSyntaxCALL QRANSET (rseed)rseed(Input) INTEGER(4). The reset value for the seed.CompatibilityCONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB2-362

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!