- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I wish to use a utility from IFPORT, specifically GETFILEINFOQQ in my program but cannot get it to work. Ive INCLUDED the module, but havent added an additional library. Do I need to do that ?
Ted
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - tedpitt
I wish to use a utility from IFPORT, specifically GETFILEINFOQQ in my program but cannot get it to work. Ive INCLUDED the module, but havent added an additional library. Do I need to do that ?
Ted
Um, you have to USE IFPORT, not INCLUDE it. What exactly is the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - anthonyrichards
Um, you have to USE IFPORT, not INCLUDE it. What exactly is the problem?
! PROGRAM: test_file_list
!
! PURPOSE: Tests compatability function GETFILEINFOQQ
!
!****************************************************************************
program test_file_list
!
use ifport
use ifcore
!
implicit none
! Variables
CHARACTER (LEN=120) :: DIRECTORY_PATH='D:WAVE ENERGYEMEC STUDIESEstimation of power from measurements',searchpattern='*.spt',directory
CHARACTER (LEN=140) :: SPECTRAL_PATH='SPECTRAL DATA',SPECTRA_PATH='BUOY B - SPECTRA - mmm 2003',OUTFILE='TESTSW',INFILE
integer(8) :: handle
integer(8) :: length,n=0
logical(4) :: result
type (file$infoi8) info
! Body of test_file_list
DIRECTORY=TRIM (DIRECTORY_PATH)//TRIM (SPECTRAL_PATH)//TRIM (SPECTRA_PATH)
result=changedirqq (directory)
if (result) then
print *, ' Directory change successful'
else
print *, ' Directory change unsuccessful'
pause
endif
I get a 6284 error, and program won't build.
Bit got left out:
length=getstrqq (searchpattern)
handle=file$first
do
length=getfileinfoqq (searchpattern,info,handle)
if (handle==file$last) exit
n=n+1
print *, info%name
enddo
print *, 'Number of files found = ',n
end program test_file_list
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The use of INTEGER(8) for HANDLE is correct only on a 64-bit platform. I suggest changing this to:
INTEGER(INT_PTR_KIND())
LENGTH probably wants to be declared this way too.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page