开发者

Reading variable length/types row in Fortran

开发者 https://www.devze.com 2023-01-26 12:32 出处:网络
I ha开发者_如何转开发ve a row of data in fortran, and I need to read in the different values. The number of values can be anything, and the type as well. Examples

I ha开发者_如何转开发ve a row of data in fortran, and I need to read in the different values. The number of values can be anything, and the type as well. Examples

0.45 1 T F

or

0.45 1 T 2.45 18.0 45.2

how can I read successfully this row, or at least decompose it in its fundamentals tokens, without fetching the next line information (this must be prevented at all costs).


You can read the entire row into a variable of type character, then you do whatever you want with the character variable, then read the next row and so forth.

0

精彩评论

暂无评论...
验证码 换一张
取 消