- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I compile the following module:
module t
integer :: i=2
integer :: j=i
end module t
IFort gave me the error message:
t.f90(3) : Error: This symbol must be a defined parameter or an argument of an inquiry function that evaluates to a compile-time constant.
Integer :: j=i
----------------^
t.f90(3) : Error: This is not a valid initialization expression.
Integer :: j=i
----------------^
Could you tell me what is wrong with my code? Thanks.
Wen
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why not follow the compilers suggestion and try
integer, parameter:: i=2
?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now I see what it meant. Thank you, Anthony.
Wen
Wen

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