- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
real(kind = 8):: x
read(*, *) x
when I input -- 1.0_8 List-Directed I/O syntax errorIntel Fortran 12.0 Compiler.
I don't know whyreal constant with kind-parameter as a input, the compiler message
a error? The Fortran 2003 Standard mention this situation?
Thanks a lot.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I understand why you might try that, but it's not allowed in Fortran. The kind is taken from the corresponding variable in the I/O list.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot.
These days I look through --- The Fortran 2003 Handbook chapter 10, and I find the following sentences:
the input values are not actually Fortran constants. They do not have to follow all the rules for Fortran literal constants and they are not allowed to have kind parameter.

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