- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any update on this? I would like to use this for setting the 'len' parameters of a derived type. Rather than put allocatable arrays in types, this seems cleaner (the array size would be fixed automatically) and safer (the compiler could tell you if you try to add two different sized pieces for instance).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Additionaly you would not have an issue with reallocate left hand side.
The initial poster indicated that he wanted to use a derived type as a parameter (whole object is const)
Weymouth is asking for something more like a template. Where instance of the template results in an object with fixed layout based on a flexible template. In the requested case, a fixed array size based on template arguments. You might be able to finess some of this with FPP.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is also an open source preprocessor implemented in python called BlockIt/PyF95++ which implements templating and an STL of sorts.
http://sourceforge.net/apps/mediawiki/blockit/index.php?title=Main_Page
A few articles have been posted to ACM Fortran Forum about this (and other) preprocessors.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page