- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks!
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
real(4), pointer :: common1Dreal(:)
real(8), pointer :: common1Ddouble(:)
real(4), pointer :: common2Dreal(:,:)
real(8), pointer :: common2Ddouble(:,:)
...
Then depending on the call arguments, initialize the proper pointer (and nullify the other pointers to catch bugs).
The problem is with the variable rank requirements.
You can create a user type
type argType_t
sequence
integer :: argType
union
map
real(4), pointer :: r1D(:)
end map
map
real(8), pointer :: d1D(:)
end map
map
real(4), pointer :: r2D(:,:)
end map
map
real(8), pointer :: d2D(:,:)
end map
...
end union
end type argType_t
and in common
type(argType) :: arg1, arg2, arg3, ...
Using the union will conserve memory HOWEVER using seperate and nullified pointers will catch programming bugs.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page