Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Compiling example code

Albert_v_
Beginner
111 Views

Hi,

I'm trying to compile the example code from the "Intel Fortran Compiler 17.0 Developer Guide and Reference" in section "Language reference" --> "Data Transfer I/O Statements" --> "User Defined Derived Type I/O"--> "Examples of User-Defined Derived-Type I/O" --> Example 4. If I compile this code with "ifort -stand f08 -o test test.f90" I get amongst others following error message:

test.f90(13): error #5082: Syntax error, found IDENTIFIER 'UNFORMATTED' when expecting one of: * .NOT. . + - /) ** / // .LT. < .LE. <= .EQ. == .NE. /= .GT. > ...
        GENERIC :: WRITE (UNFORMATTED) => MY_UNFMT_WRITE

I tried to use different standards like 03 and 95 and looked for compiler options that could resolve this but no success.. Any help how to compile?

 

0 Kudos
2 Replies
mecej4
Black Belt
111 Views

The program source in the PDF has two lines collapsed:

    INTEGER :: IOSTAT    CHARACTER(LEN=100) :: IOMSG
should be
    INTEGER :: IOSTAT
    CHARACTER(LEN=100) :: IOMSG
 
Kevin_D_Intel
Employee
111 Views

Our apologies. I reported this to our Documentation team.

(Internal tracking id: DPD200417204)

Reply