Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29011 Discussions

generic :: write(formatted) supported ?

Jim_Vickroy
Beginner
443 Views

Hello Group,

Below is a code fragment from a module I'm trying to compile withIntel Visual Fortran Composer XE for Windows (just purchased on December 8).

type, public :: Status_Type

contains ! the following type-bound procedures:

procedure :: formatted_unit_WRITE

generic :: write(formatted) => formatted_unit_WRITE

end type Status_Type

Here are the compiler messages:

error #5082: Syntax error, found IDENTIFIER 'FORMATTED' when expecting one of: * .NOT. . + - /) ** / // .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...

generic :: write(formatted) => formatted_unit_WRITE

error #6268: The keyword ASSIGNMENT or OPERATOR was expected in this context [WRITE]

generic :: write(formatted) => formatted_unit_WRITE

I'm new to Fortran so there may be syntax errors in the above code fragment. Could someone kindly point me in the right direction. The code fragment is based on an example in a Fortran book (Fortran 95/2003 Explained) I'm reading.

Thanks

0 Kudos
1 Solution
Steven_L_Intel1
Employee
443 Views
This is a F2003 feature called User-Defined Derived Type I/O. Intel Fortran does not yet support that.

View solution in original post

0 Kudos
2 Replies
Steven_L_Intel1
Employee
444 Views
This is a F2003 feature called User-Defined Derived Type I/O. Intel Fortran does not yet support that.
0 Kudos
Jim_Vickroy
Beginner
443 Views

Amazingly fast response ! Thanks much!

0 Kudos
Reply