- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to include allocatable arrays in a module - I can find nothing about this in the language reference.
eg.
MODULE grid_cells
IMPLICIT NONE
integer, ALLOCATABLE :: kzn(:)
real, ALLOCATABLE :: znx(:), zny(:)
SAVE
END MODULE grid_cells
Then USE grid_cells in 3 scoping units, the arrays allocated in one of these.
eg. ALLOCATE( znx(max_grids), zny(max_grids), kzn(max_grids) )
The compiler does not like the above syntax. Is there some other way of doing it, or is there no way to include allocatable arrays in a module ?
David
eg.
MODULE grid_cells
IMPLICIT NONE
integer, ALLOCATABLE :: kzn(:)
real, ALLOCATABLE :: znx(:), zny(:)
SAVE
END MODULE grid_cells
Then USE grid_cells in 3 scoping units, the arrays allocated in one of these.
eg. ALLOCATE( znx(max_grids), zny(max_grids), kzn(max_grids) )
The compiler does not like the above syntax. Is there some other way of doing it, or is there no way to include allocatable arrays in a module ?
David
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This should work fine. You don't give the actual source code nor the error message, so I have no idea what is going wrong. I suggest you send a short but complete example to us at vf-support@compaq.com and we'll take a look.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Curious - I have not seen that symptom before. If you can reproduce it in the future, please send a ZIP file of the project to us and we'll take a look.
Steve
Steve
![](/skins/images/B7BA37F9CE4B52FF7CAE1FB0388839C8/responsive_peak/images/icon_anonymous_message.png)
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