- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the following line of data in a text file
02-09-2002 00:00:50.746 7.12657 0.553686 4.04152 5.27265 -2.52344 7.10651 -20.7989 52.5296
I am trying to read it with the "semi-formatless" code:
read(1,'(24x,10(f,:))')(a,j=1,iSkip),x
Depensing on iSkip, the number of uninteresting columns, X will contain a different value.
The idea is to skip the text but still read the real numbers without having to specify a format.
this works ok until I get to the last two values. UPon read the negative is dropped. but if I shift the value -20.7989 to the right by one column I get the correct value. If I shift to the left I lose even more digits. The same thing happens to the last column.
any ideas?
Tim
02-09-2002 00:00:50.746 7.12657 0.553686 4.04152 5.27265 -2.52344 7.10651 -20.7989 52.5296
I am trying to read it with the "semi-formatless" code:
read(1,'(24x,10(f,:))')(a,j=1,iSkip),x
Depensing on iSkip, the number of uninteresting columns, X will contain a different value.
The idea is to skip the text but still read the real numbers without having to specify a format.
this works ok until I get to the last two values. UPon read the negative is dropped. but if I shift the value -20.7989 to the right by one column I get the correct value. If I shift to the left I lose even more digits. The same thing happens to the last column.
any ideas?
Tim
Link Copied
0 Replies

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