- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that the attached code exposes a (small) bug in ifort:
ifort xyz.f90 -o xyz
xyz.f90(21): error #5082: Syntax error, found '.' when expecting one of: ( ,
write(*,*) .s."12.34"
-------------^
compilation aborted for xyz.f90 (code 1)
I think that the code is correct; am I wrong?
Thank you,
Marco
ifort -V
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20091012 Package ID: l_cprof_p_11.1.056
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
module m
interface operator(.s.)
module procedure afun
end interface
contains
pure function afun(s) result(x)
character(len=*), intent(in) :: s
real :: x
read(s,*) x
end function afun
end module m
program xyz
use m
write(*,*) .s."12.34"
!write(*,*) (.s."12.34") ! this works
end program xyz
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Marco,
You're correct - this does indeed seem to be a bug. I'll let the developers know - thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This will be fixed in the next major release.

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