Funky read

Funky read

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

1 条帖子 / 0 全新
如需更全面地了解编译器优化,请参阅优化注意事项