标准摘要
[中文适用范围]: ISO/IEC 1539 的这一部分定义了 Fortran 中用于操作动态可变长度字符串的工具。 ISO/IEC 1539的这一部分为ISO/IEC 1539-1:1997规定的Fortran语言版本提供了辅助标准,非正式地称为Fortran 95。 符合1539-2:1994的程序也符合该标准。 ISO/IEC 1539 的这一部分是定义 Fortran 95 的辅助标准,因为它定义了主要语言标准中固有定义的附加功能。 符合 Fortran 95 标准的处理器不需要也符合 ISO/IEC 1539 的这一部分。 但是,符合 ISO/IEC 1539 的这一部分假定符合主要的 Fortran 95 标准。 ISO/IEC 1539 的这一部分规定了 Fortran 模块的名称、用于表示变长字符串的派生数据类型的名称、为操作该类型的对象而提供的过程和运算符的接口,以及该模块可访问的每个实体所需的语义。 ISO/IEC 1539 的这一部分没有规定任何实施的细节。 既没有规定用于表示已定义类型的数据实体的方法,也没有规定用于实现其接口由 ISO/IEC 1539 本部分定义的过程或运算符的算法。 一致的实现可以使用任何表示和任何算法,仅满足以下要求:可公开访问的名称和接口符合 ISO/IEC 1539 本部分的要求,并且语义符合 ISO/IEC 1539 本部分和那些要求ISO/IEC 1539-1 : 1997。 应该注意的是,处理器不需要实现 ISO/IEC 1539 的这一部分才能成为符合标准的 Fortran 处理器,但如果处理器实现了用于操作不同长度字符的设施字符串,建议以符合 ISO/IEC 1539 这一部分的方式完成。 符合 ISO/IEC 1539 这一部分的处理器可以扩展为操作不同长度字符串而提供的设施,只要因为此类扩展与 ISO/IEC 1539 的本部分或 ISO/IEC 1539-1 : 1997 不冲突。 附件 A 中引用了用符合 Fortran 标准编写的模块。 该模块说明了所描述的功能的一种方式ISO/IEC 1539 的这一部分可以提供。 该模块既符合 ISO/IEC 1539 这部分的要求,又因为它是用符合标准的 Fortran 编写的,所以它提供了所需设施的可移植实现。 该模块仅供参考,无意以任何方式限制实现。 该模块演示了至少一种符合标准且可移植的 Fortran 实现是可能的。 应该注意的是,ISO/IEC 1539 的这一部分仅定义了用于动态改变默认类型字符串长度的工具。 在 ISO/IEC 1539 的这一部分中,所有对内在类型 CHARACTER 的引用都应被理解为默认类型的含义字符。 可以通过针对每个此类字符种类的单独的(如果相似的话)模块来为非默认种类字符定义类似的设施。 ISO/IEC 1539 的这一部分的设计尽可能合理地为不同长度的字符串提供可用于固有固定长度字符串的设施。 适用于固定长度字符串的所有固有操作和函数都具有 ISO/IEC 1539 本部分针对可变长度字符串定义的扩展含义。 由于内在类型和变长派生数据类型之间的本质区别,还定义了少量适当的附加设施。 [外文原描述]: This part of ISO/IEC 1539 defines facilities in Fortran for the manipulation of character strings of dynamically variable length. This part of ISO/IEC 1539 provides an auxiliary standard for the version of the Fortran language specified by ISO/IEC 1539-1: 1997 and informally known as Fortran 95. A program that conforms with 1539-2: 1994 also conforms with this standard. This part of ISO/IEC 1539 is an auxiliary standard to that defining Fortran 95 in that it defines additional facilities to those defined intrinsically in the primary language standard. A processor conforming to the Fortran 95 standard is not required also to conform to this part of ISO/IEC 1539. However, conformance to this part of ISO/IEC 1539 assumes conformance to the primary Fortran 95 standard. This part of ISO/IEC 1539 prescribes the name of a Fortran module, the name of a derived data type to be used to represent varying-length strings, the interfaces for the procedures and operators to be provided to manipulate objects of this type, and the semantics that are required for each of the entities made accessible by this module. This part of ISO/IEC 1539 does not prescribe the details of any implementation. Neither the method used to represent the data entities of the defined type nor the algorithms used to implement the procedures or operators whose interfaces are defined by this part of ISO/IEC 1539 are prescribed. A conformant implementation may use any representation and any algorithms, subject only to the requirement that the publicly accessible names and interfaces conform to this part of ISO/IEC 1539, and that the semantics are as required by this part of ISO/IEC 1539 and those of ISO/IEC 1539-1 : 1997. It should be noted that a processor is not required to implement this part of ISO/IEC 1539 in order to be a standard conforming Fortran processor, but if a processor implements facilities for manipulating varying length character strings, it is recommended that this be done in a manner that is conformant with this part of ISO/IEC 1539. A processor conforming to this part of ISO/IEC 1539 may extend the facilities provided for the manipulation of varying length character strings as long as such extensions do not conflict with this part of ISO/IEC 1539 or with ISO/IEC 1539-1 : 1997. A module, written in standard conforming Fortran, is referenced in Annex A. This module illustrates one way in which the facilities described in this part of ISO/IEC 1539 could be provided. This module is both conformant with the requirements of this part of ISO/IEC 1539 and, because it is written in standard conforming Fortran, it provides a portable implementation of the required facilities. This module is referenced for information only and is not intended to constrain implementations in any way. This module is a demonstration that at least one implementation, in standard conforming and hence portable Fortran, is possible. It should be noted that this part of ISO/IEC 1539 defines facilities for dynamically varying length strings of characters of default kind only. Throughout this part of ISO/IEC 1539 all references to intrinsic type CHARACTER should be read as meaning characters of default kind. Similar facilities could be defined for non-default kind characters by a separate, if similar, module for each such character kind. This part of ISO/IEC 1539 has been designed, as far as is reasonable, to provide for varying length character strings the facilities that are available for intrinsic fixed length character strings. All the intrinsic operations and functions that apply to fixed length character strings have extended meanings defined by this part of ISO/IEC 1539 for varying length character strings. Also a small number of additional facilities are defined that are appropriate because of the essential differences between the intrinsic type and the varying length derived data type.
英文名称Information technology - Programming languages - Fortran - Part 2: Varying length character strings