- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Compiler error #6284: There is no matching specific function for this generic function reference. [GETFILEINFOQQ]
Thanks - Phil Seeger
INCLUDE 'BuildData.inc'
COMMON /Build_Data/ NSURF, NREG, NPARAM, idum, NAME, SURF,
C 'DataPath' determined at Initialization, and saved in common
...
TYPE(FILE$INFOI8) DIR_INFO
INTEGER*8 hndl8
INTEGER*4 NN
DATA SourcePath, LenPath/' ', 0/
SAVE SourcePath, LenPath
...
CASE ('S')
SourcePath = DataPath(1:LEN_TRIM(DataPath))//'Tables\'
LenPath = LEN_TRIM(SourcePath)
FLAG = DLGSET(DBOX, 1000+I, 100, DLG_NUMITEMS)
N = 0
! Loop to find all possible Source Table (*.tbl) files
hndl8 = FILE$FIRST
DO WHILE (hndl8.NE.FILE$LAST .AND. hndl8.NE.FILE$ERROR)
--> NN = GETFILEINFOQQ(SourcePath(1:LenPath)//'*.tbl',
& DIR_INFO, hndl8)
IF (NN .GT. 0) THEN
C Add file name to a COMBOBOX for possible selection
N = N + 1
FLAG = DLGSET(DBOX, 1000+I, DIR_INFO%NAME(1:NN), N)
END IF
END DO
FLAG = DLGSET(DBOX, 1000+I, N, DLG_NUMITEMS)
FLAG = DLGSET(DBOX, 1000+I, STR(I), DLG_STATE)
END SELECT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The source file that you attached cannot be compiled unless you also provide the include files named in it. I suspect that the error lies in the type declaration of handle-type variables that are passed to Windows routines through IFPORT. If you ran the 32-bit compiler on the code that you provided (and from which you took the excerpts that you posted inline), the compiler would complain (Error #6284) that INTEGER(8) variables are not suitable for use as Windows handle variables in 32-bit mode. Conversely, INTEGER(4) variables are not proper for handles in Windows 64.
You can use the same source code for 32-bit and 64-bit Windows if you declare the type of handles as INTEGER(KIND=INT_PTR_KIND( )). The following short example code displays information regarding files with the extension '.F90' in a particular directory. It runs with IFort 18.0.3, 32 or 64 bit.
C List all files in a specified directory that have the extension ".f90" program xseeger use ifport implicit none TYPE(FILE$INFO) DIR_INFO INTEGER(KIND=INT_PTR_KIND( )) hndl INTEGER NN,n,i CHARACTER(20) SourcePath C SourcePath = 's:\lang\' N = 0 hndl = FILE$FIRST print *,' FILE LENGTH' DO NN = GETFILEINFOQQ(trim(SourcePath)//'*.f90',DIR_INFO, hndl) IF(hndl.eq.FILE$LAST.or.hndl.eq.FILE$ERROR.or.NN.eq.0)exit N = N + 1 write(*,'(I2,2x,A15,2x,I6)')N,dir_info%name,dir_info%length END DO end program
The IFort documentation page on GETFILEINFOQQ also contains a slightly longer example.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The source file that you attached cannot be compiled unless you also provide the include files named in it. I suspect that the error lies in the type declaration of handle-type variables that are passed to Windows routines through IFPORT. If you ran the 32-bit compiler on the code that you provided (and from which you took the excerpts that you posted inline), the compiler would complain (Error #6284) that INTEGER(8) variables are not suitable for use as Windows handle variables in 32-bit mode. Conversely, INTEGER(4) variables are not proper for handles in Windows 64.
You can use the same source code for 32-bit and 64-bit Windows if you declare the type of handles as INTEGER(KIND=INT_PTR_KIND( )). The following short example code displays information regarding files with the extension '.F90' in a particular directory. It runs with IFort 18.0.3, 32 or 64 bit.
C List all files in a specified directory that have the extension ".f90" program xseeger use ifport implicit none TYPE(FILE$INFO) DIR_INFO INTEGER(KIND=INT_PTR_KIND( )) hndl INTEGER NN,n,i CHARACTER(20) SourcePath C SourcePath = 's:\lang\' N = 0 hndl = FILE$FIRST print *,' FILE LENGTH' DO NN = GETFILEINFOQQ(trim(SourcePath)//'*.f90',DIR_INFO, hndl) IF(hndl.eq.FILE$LAST.or.hndl.eq.FILE$ERROR.or.NN.eq.0)exit N = N + 1 write(*,'(I2,2x,A15,2x,I6)')N,dir_info%name,dir_info%length END DO end program
The IFort documentation page on GETFILEINFOQQ also contains a slightly longer example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you mecej4! Your answer was exactly what I needed to know, and your explanation was very clear.
Phil Seeger
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page