- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
According to the documentation and the compiler error messages, allocatable arrays and static arrays with nonconstant bounds cannot be used with a NAMELIST. For example,
This seems to be an arbitrary limit--is there a basis for it? I guess the only work around is to make the array large enough for the expected range of values for gMax.
REAL :: arr(gMax)results in the error
NAMELIST /NLIST/ arr
Error: A NAMELIST group object must not be an array with nonconstant bounds.
This seems to be an arbitrary limit--is there a basis for it? I guess the only work around is to make the array large enough for the expected range of values for gMax.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The restriction is stated in the Fortran 95 standard, but in Fortran 2003 the rule is simply that the object cannot be an assumed-size array, so eventually we'll relax the implementation to meet the standard.

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