- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have done a search for IOMSG in the Intel Fortram manual 11.1 but there does not appear to be much information available other than stating it is a Fortran 2003 feature included in this release.
There is no mention of theIOMSG specifier in the File Operation I/O Statements section.
Is this something that will be addressed in later versions of the manual?
How does one determine the correct size of the character array passed as the IOMSG parameter?
CHARACTER() :: msg
OPEN(......., IOMSG=msg)
Isthe minimum length defined in the Fortran 2003 Standard or is it Compiler dependent?
Is there a way to query, at runtime,what the minimum length is?
regards
Mike
I have done a search for IOMSG in the Intel Fortram manual 11.1 but there does not appear to be much information available other than stating it is a Fortran 2003 feature included in this release.
There is no mention of theIOMSG specifier in the File Operation I/O Statements section.
Is this something that will be addressed in later versions of the manual?
How does one determine the correct size of the character array passed as the IOMSG parameter?
CHARACTER(
OPEN(......., IOMSG=msg)
Isthe minimum length defined in the Fortran 2003 Standard or is it Compiler dependent?
Is there a way to query, at runtime,what the minimum length is?
regards
Mike
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Fortran standard is silent on the matter of the length, and there is no way to query a "minimum length". In our implementation, a length of 100 should suffice. Yes, we plan on documenting the F2003 features in a future version.
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Fortran standard is silent on the matter of the length, and there is no way to query a "minimum length". In our implementation, a length of 100 should suffice. Yes, we plan on documenting the F2003 features in a future version.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the IOMSG is a system message text string then the O/S may have a maximum message string size. As to what to use, this may depend on the O/S. 100 might be too small _MAX_PATH (260) might be safer. One buffer of _MAX_ENV (32767) might be safest.
These are Windoz values, alter for Linux/Mac equivilents.
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe that it is a string from the Intel Fortran message catalog and won't include system error text.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jimdempseyatthecove
If the IOMSG is a system message text string then the O/S may have a maximum message string size. As to what to use, this may depend on the O/S. 100 might be too small _MAX_PATH (260) might be safer. One buffer of _MAX_ENV (32767) might be safest.
These are Windoz values, alter for Linux/Mac equivilents.
Jim
Thanks for this information.
I did a search of the Fortran manual and could find no reference to these two values.
I tried printing out _MAX_PATH, _MAX_ENV, MAX_PATH, MAX_ENV in a small Fortran program (11.0.074)
but the compiler claims they are undeclared. Do I need to use a module or something else to get these values?
I am using a Linux system. Does this make a difference?
regards
Mike
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Those are all Windows constants defined in Windows-only modules. There are no equivalent constants defined for Fortran on Linux. Just pick a number.

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