- 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
If you create two dummy variables in the named common block, one you force to load first, and the second you force to load last. e.g. DummyFirst and DummyLast. Then you can use LOC on the variables to get the information you want.
iSizeOfCommon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you create two dummy variables in the named common block, one you force to load first, and the second you force to load last. e.g. DummyFirst and DummyLast. Then you can use LOC on the variables to get the information you want.
iSizeOfCommon =
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
iSizeOfCommon = LOC(DummyLast) - LOC(DummyFirst)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply. That was a good idea; but because I don't want to browse all my source code to find the larger declaration for a particular common (because in this caseI could read the declaration and compute the common's size), I have expected to find some function that takes the name of the common and returns its size, something like that:
common /blablabla/ first, scnd, third, ..., last ... iSozeOfCommon = SizeOfCommon(blablabla)
or some artefact that gives the same results. I'm not sure that it's possible to proceed that way.
To be more precise, I have some declarations like:
common /THPUR/ PUR(LDTH1,NPUR) (size = LDTH1*NPUR*8)
in the main source, and in some other sources, I have:
common /THPUR/ PUR(1) (size ?)
or
real(8) PUR(LDTH1,NPUR) common /THPUR/ PUR (size ?)
if I look only for common declarations, I will not be able to be sure of all sizes.
- 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

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