GETFILEINFOQQ in ifort on 64bit

I accounted a problem with the GETFILEINFOQQ of ifort function such as

Lsac2Ssac_SubUse.f90(473): error #6284: There is no matching specific function for this generic function reference.   [GETFILEINFOQQ]
FnameLength=GETFILEINFOQQ(EventListfile,FileInfo,FileHandle)
--------------^

and it was a problem of declaration, the previous code was

type (File$Info) :: FileInfo
integer :: FnameLength, FileHandle
character(len=32) :: LSindexfile
!
FileHandle =file$first
FnameLength=GETFILEINFOQQ(EventListfile,FileInfo,FileHandle)
LSindexfile='LS'//FileInfo.name(3:FnameLength)

And in 64 bit machine, FileHandle should be declared as 8 bit and is suggested be declared as

INTEGER(INT_PTR_KIND())

( ref: Intelо Fortran Compiler User and Reference Guides p.2754 & intel fortran forum post: GETFILEINFOQQ & Documentation of IFPORT::GETFILEINFOQQ )

so it became

type (File$Info) :: FileInfo
integer :: FnameLength
integer(INT_PTR_KIND()) :: FileHandle
character(len=32) :: LSindexfile
!
FileHandle =file$first
FnameLength=GETFILEINFOQQ(EventListfile,FileInfo,FileHandle)
LSindexfile='LS'//FileInfo.name(3:FnameLength)

and it works

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *