Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

GetFileInfoQQ

JohnNichols
Valued Contributor III
926 Views
Dear Steve:

I thought a QQ function indicated a Quickwin application.

The GETFILEINFOQQ code listing in the Fortran help File includes the following sample.

I have an instrument which has a Capture Program written in C (not by me) that puts out the files of a fixed time length using the time an date as a name combination. This following code nicely picks the files up in time order and allows me to analyse them in time order, which is important as this is intended as uninterpreted operation.

The IVF file does not say I can use this with windows, but it does work.

Is there something I am missing, because this code is so good I do not want to change it, except for error codes?

Also "Can I make calls to NET4 from FORTRAN?" I am just curious about this, not that I am going to do it.

In terms of the SQl server thanks for the advice and I will go with COM.

Interestingly your spell checker insists that Fortran is all Caps.


Regards

JMN

[bash]USE IFPORT USE IFCORE CALL SHOWPERMISSION( ) END ! SUBROUTINE to demonstrate GETFILEINFOQQ SUBROUTINE SHOWPERMISSION( ) USE IFPORT CHARACTER(80) files INTEGER(KIND=INT_PTR_KIND( )) handle INTEGER(4) length CHARACTER(5) permit TYPE (FILE$INFO) info WRITE (*, 900) ' Enter wildcard of files to view: ' 900 FORMAT (A, \) length = GETSTRQQ(files) handle = FILE$FIRST DO WHILE (.TRUE.) length = GETFILEINFOQQ(files, info, handle) IF ((handle .EQ. FILE$LAST) .OR. & (handle .EQ. FILE$ERROR)) THEN SELECT CASE (GETLASTERRORQQ( )) CASE (ERR$NOMEM) WRITE (*,*) 'Out of memory' CASE (ERR$NOENT) EXIT CASE DEFAULT WRITE (*,*) 'Invalid file or path name' END SELECT END IF permit = ' ' IF ((info%permit .AND. FILE$HIDDEN) .NE. 0) & permit(1:1) = 'H' IF ((info%permit .AND. FILE$SYSTEM) .NE. 0) & permit(2:2) = 'S' IF ((info%permit .AND. FILE$READONLY) .NE. 0) & permit(3:3) = 'R' IF ((info%permit .AND. FILE$ARCHIVE) .NE. 0) & permit(4:4) = 'A' IF ((info%permit .AND. FILE$DIR) .NE. 0) & permit(5:5) = 'D' WRITE (*, 9000) info%name, info%length, permit 9000 FORMAT (1X, A5, I9, ' ',A6) END DO END SUBROUTINE Parent topic:G [/bash]
0 Kudos
3 Replies
Steven_L_Intel1
Employee
926 Views
John,

No, QQ does not indicate QuickWin. This is a suffix Microsoft came up with to indicate Fortran library routines.

Of course, GETFILEINFOQQ works on Windows. I don't see you describing a problem, however. What are you looking for?

As for calling .NET from Fortran, yes, this can be done, though the documentation is very scant. You use the "Fortran Module Wizard" to identify the .NET assembly you want to use. It then generates Fortran routines that serve as the interface between your code and .NET.

As for the spell checker, yeah, this is an ongoing battle. MS Word says the same.
0 Kudos
JohnNichols
Valued Contributor III
926 Views
Of course, GETFILEINFOQQ works on Windows. I don't see you describing a problem, however. What are you looking for?

Sorry;

In teh help File it lists the application types you can use the subroutine with, and GetFile lists all except Windows. I was wondering if it had a potetnial problem in Windows?
Splee Chekers: Lifes a beech and then someone yells timreb

Thanks

JMN
0 Kudos
Steven_L_Intel1
Employee
926 Views
Ah, I see. This is just an inadvertent omission - I will ask our writers to fix it, though you may not see the fix for a while.
0 Kudos
Reply