- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
Steve is so helpful here and I can't help asking another question :-)
ifort has a restriction that Variables containing ultimate allocatable array components are forbidden from appearing directly in input/output lists.
[bash] type a integer, allocatable :: a1(:) end type a type(a), allocatable :: b(:) write(*,*) 'b = ', b [/bash]
I am wondering is it possible that the future version of ifort will remove this restriction? If not, what is the better way to write out or read in a derived type containing allocatable components? Our derived types are very complicated and contain many components and sub-components, so it will be very painful to explicitly list all the components and sub-components in input/output list.
Thank you very much for your kind help!
Best regards,
Victor
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The wording in the standard is this:
9 If a list item of derived type in a formatted input/output statement is not processed by a defined in-
10 put/output procedure, that list item is treated as if all of the components of the list item were specified
11 in the list in component order; those components shall be accessible in the scoping unit containing the
12 input/output statement and shall not be pointers or allocatable.
13 If a derived-type list item is not processed by a defined input/output procedure and is not treated as a list
14 of its individual components, all the subcomponents of that list item shall be accessible in the scoping unit
15 containing the input/output statement and shall not be pointers or allocatable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve,
Thank you very much for your detailed explanation!
I am wondering are there any differences regarding the treatment of derived type containing an allocatable component in a formatted input/output statement vs. in an unformatted statement?
Thanks again for all your help!
Best regards,
Victor
- 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
Thank you again very much, Steve!
Best regards,
Victor

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