- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I defined a constant in INCLUDE like this:
integer xxxxx
parameter (xxxxx=10)
real*4 aaa(xxxxx)
COMMON /BB/ aaa
I got error message like this after I compile the project:
This name cannot be assigned this data type because it conflicts with prior uses of the name [xxxxx].
The dimensions of this array have been defined more than once. [aaa]
However, it is not defined elsewhere.
Thanks!
integer xxxxx
parameter (xxxxx=10)
real*4 aaa(xxxxx)
COMMON /BB/ aaa
I got error message like this after I compile the project:
This name cannot be assigned this data type because it conflicts with prior uses of the name [xxxxx].
The dimensions of this array have been defined more than once. [aaa]
However, it is not defined elsewhere.
Thanks!
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you ever find out what was wrong with this? I've been having the same trouble....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you have a small but complete example? Please attach it here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually, I figured it out, and it might help this other guy--a subroutine that passes an argument X used to define an array size (say, A(X,X)) will apparently decide on a type for that argument when it first sees the array A defined; if the argument X is defined AFTER that, FORTRAN returns an error. So
SUB1 (A,X)
IMPLICIT REAL
REAL A(X,X)
INTEGER X
doesnt work, while
SUB1 (A,X)
IMPLICIT REAL
INTEGER X
REAL A(X,X)does. This might be related to the problem that seemed to be an INCLUDE file error.

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