- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have ifc7-7.0.64 and we cannot print character strings which are passed to subroutines and have been declared as
CHARACTER*(*) SOMESTRING
in the subroutines.
The debugger seems to interpret this as a zero-length
array when, in fact, it is not. Do we have to resort to
PRINT statements to see the contents of the strings within the subroutines?
TIA,
mgo
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which debugger are you using? idb should understand this.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Intel's debugger, idb.
You've not experienced this problem with your
character strings?
You've not experienced this problem with your
character strings?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't tend to use Linux, so I'm not familiar with the issues there. I suggest reporting the problem through Premier Support, where someone will get back to you with an informed response.
Steve
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just a thought, you might try using null-terminated strings as in C. E.g.
character(len=12)HELLOWORLD
data_HELLOWORLD/'Hello World'C/
Then when this is passed to a subroutine as CHARACTER*(*), the debugger might be more likely to figure out the string length, which it can't do from the declaration.
Only a speculation, you should follow Steve's advice and report this to Premier Support.
Otherwise, you could try copying the argument, or some limited number of characters, into a local character variable of fixed length.
Martyn
character(len=12)HELLOWORLD
data_HELLOWORLD/'Hello World'C/
Then when this is passed to a subroutine as CHARACTER*(*), the debugger might be more likely to figure out the string length, which it can't do from the declaration.
Only a speculation, you should follow Steve's advice and report this to Premier Support.
Otherwise, you could try copying the argument, or some limited number of characters, into a local character variable of fixed length.
Martyn

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