格式为(A4,1X,3F7.1)的数据编辑描述符为A4和F7.1.只有F7.1具有重复说明(F之前的数字).这只是意味着格式就像描述符重复出现一样:F7.1, F7.1, F7.1.重复规格为1或未给出,则只有一个外观.那么问题的格式就像(A4,1X,F7.1,F7.1,F7.1)此格式是问题图像之一中提供的规则所涵盖的格式.特别是,重复指定的方面在规则2中给出,并带有规则3的相应示例.此外,在Fortran中,重复计数说明符也可能是*作为特例:这就像一个非常大的重复计数. *(F7.1)就像F7.1, F7.1, F7.1, ....我没有迹象表明HLM支持此功能,但是如果需要此功能,则可以使用非常大的重复计数.在1X中,1不是重复说明,而是位置编辑描述符的必要组成部分.I am trying to create an MDM file using HLM 7 Student version, but since I don't have access to SPSS I am trying to import my data using ASCII input. As part of this process I am required to input the data format Fortran style. Try as I might I have not been able to understand this step. Could someone familiar with Fortran (or even better HLM itself) explain to me how this works? Here is my current understanding From the example EG3.DAT they give (A4,1X,3F7.1)I thinkA4 signifies that the ID is 4 characters long.1X means skip a space.F.1 means that it should read 1 decimal places.I am very confused about what 3F7 might mean.EG3.DAT2020 380.0 40.3 12.52040 502.0 83.1 18.62180 777.0 96.6 44.4Below are examples from the help documents.Rules for format statementFormat statement exampleEG1 data formatEG2 data formatEG3 data format 解决方案 In Fortran, so-called data edit descriptors (which format the input or output of data) may have repeat specifications.In the format (A4,1X,3F7.1) the data edit descriptors are A4 and F7.1. Only F7.1 has a repeat specification (the number before the F). This simply means that the format is as though the descriptor appeared repeated: like F7.1, F7.1, F7.1. With a repeat specification of 1, or not given, there is just the single appearance.The format of the question, then, is like(A4,1X,F7.1,F7.1,F7.1)This format is one that is covered by the rules provided in one of the images of the question. In particular, the aspect of repeat specification is given in rule 2 with the corresponding example of rule 3.Further, in Fortran proper, a repeat count specifier may also be * as special case: that's like an exceptionally large repeat count. *(F7.1) would be like F7.1, F7.1, F7.1, .... I see no indication that this is supported by HLM but if this is needed a very large repeat count may be given instead.In 1X the 1 isn't a repeat specification but an integral, and necessary, part of the position edit descriptor. 这篇关于3F7.1在Fortran数据格式中的含义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-27 16:25