- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using read statement to read data from file, which contains data as types as 1 0.845149. I want to read these data into real numbers. What is the right format to do here? I tried many different ways. I could not get it.
Thanks
Erhei
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use either list-directed input ("don't care about format"):
READ(11, *) F1, F2
or use "zero-precision" with F edit descriptor. Note that this is actually preferred method to read reals, as it does not care where the decimal point is actually located in the file:
READ(11, "(F3.0, F10.0)") F1, F2
Jugoslav
![](/skins/images/B7BA37F9CE4B52FF7CAE1FB0388839C8/responsive_peak/images/icon_anonymous_message.png)
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