Common block & Allocatable array?

Common block & Allocatable array?

Community Admin's picture

Can I have an allocatable array in a common block?
I get the message 'This common scalar array is invalid in this context'
Have I coded it wrong or can I not do it?

David

common/cBoundary/point
integer*4,allocatable :: point(:)
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

No, allocatables are not allowed in common blocks. Try putting it in a module instead.

LarsM

Login to leave a comment.