- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need to check length of a file after opening it in my code written in F77. Can I do it using just one procedure like NFSIZE() in MS FORTRAN or FILESIZE() in WATCOM FORTRAN? I learned I could use the procedure GETFILEINFOQQ() but it seems to me a little complicated. Is there any simpler way?
Pawel
Pawel
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CHARACTER FILE_NAME*128
INTEGER*4, EXTERNAL :: STAT
INTEGER*4 STATB(12), IS, FILE_LEN
! ...
IS = STAT ( FILE_NAME, STATB )
IF ( IS .NE. 0 ) THEN
! Error message ...
END IF
FILE_LEN = STATB(8)
! ...
Enjoj!
Leonid
P.S. You may need -Vaxlib option for linking

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