- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to convert some elderly COMPAQ vintage Fortran to compile under the Intel compiler, and VS 2008. After using the "Extract Compaq Visual FORTRAN Project Items" tool I get masses of compilation errors :-(
The first set are of this form:
In SOMESUB.FOR I have
INCLUDE 'PARAMS.FI'
INCLUDE 'VALVE.FI'
PARAMS.FI contains
PARAMETER (P_JWTVLV=600)
VALVE.FI contains
STRUCTURE /NRTV_S/
INTEGER NVALVE(P_JWTVLV)
...
Compilation of SOMESUB.FOR fails with
error #6465: Adjustable, assumed-size, or passed-length declarations are invalid in field declarations. [NVALVE]
Any idea on cause/best solution? I can fix the compilation error by hard coding 600 into the declaration of NVALVE, but that's a pretty horrible thing to have to do.
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This should work, if P_JWTVLV is declared integer before assigning a value, and the files are included in the order you quoted. The f90 way would be
INTEGER, PARAMETER :: P_JWTVLV = 600
If you didn't give P_JWTVLV a type, you are running into non-support of a legacy pre-f77 version of PARAMETER.
INTEGER, PARAMETER :: P_JWTVLV = 600
If you didn't give P_JWTVLV a type, you are running into non-support of a legacy pre-f77 version of PARAMETER.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This should work, if P_JWTVLV is declared integer before assigning a value, and the files are included in the order you quoted. The f90 way would be
INTEGER, PARAMETER :: P_JWTVLV = 600
If you didn't give P_JWTVLV a type, you are running into non-support of a legacy pre-f77 version of PARAMETER.
INTEGER, PARAMETER :: P_JWTVLV = 600
If you didn't give P_JWTVLV a type, you are running into non-support of a legacy pre-f77 version of PARAMETER.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Whoops ... I just noticed the $IF DEFINED (OS_WINDOWS) way back in the parameters include file. Having got rid of that malarkey (compiling on DOS is no longer a requirement !) I am down to two errors - woohoo!
Thanks for the thought Tim!
Thanks for the thought Tim!

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