- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to use derived-type io which is on the list of new features but can't get my code to compile. I've stared at the code for too long now so hopefully some fresh eyes will immediately spot my mistake(s).
Thanks.
[fortran]
module points
implicit none
type point
real :: m_p(3)
contains
procedure, public :: write_f_point
generic :: write(formatted) => write_f_point
procedure, public :: print => print_point
end type point
contains
subroutine print_point(this)
class(point), intent(in) :: this
write(*,'(dt)') this
end subroutine print_point
subroutine write_f_point(this, u, iotype, v_list, iostat, iomsg)
class(point), intent(in) :: this
integer, intent(in) :: u
character(*), intent(in) :: iotype
integer, intent(in) :: v_list(:)
integer, intent(out) :: iostat
character(*), intent(inout) :: iomsg
iostat = 0
write(*,fmt='(3(a,f0.4),a)') '(',this%m_p(1),',',this%m_p(2),',',this%m_p(3),')'
end subroutine write_f_point
end module points
[/fortran]
ifort -V -o points.o -c points.f90
Intel(R) Fortran Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 14.0.0.051 Beta Build 20130529
Copyright (C) 1985-2013 Intel Corporation. All rights reserved.
ifort: NOTE: The Beta evaluation period for this product ends on 27-sep-2013 UTC.
Intel(R) Fortran 14.0-1530
points.f90(17): error #8309: A list item shall not be polymorphic unless it is processed by a user-defined derived-type input/output procedure. [THIS]
write(*,'(dt)') this
--------------------^
compilation aborted for points.f90 (code 1)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please use Intel Premier Support for all beta issues. But before you do that, try the beta update which is now available. We fixed many issues in DTIO. I think what you're doing should be ok.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - I'll take it to Premier Support.

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