When Default KIND Isn't Good Enough Technical Specification and Syntax To: J3 From: Craig Dedo Date: December 14, 2000 Subject: When Default KIND Isn't Good Enough - Technical Specification and Syntax Rationale Within the last few years, 64-bit computers have become much more available and many more Fortran compilers offer a 64-bit integer data type. However, in most such cases the default KIND for integers is 32 bits. The current Fortran standard requires the use of default integers for the results of some inquiry functions and use in some input/output operations. This requirement limits the usefulness of these features with Fortran processors which support integer KINDs larger than 32 bits. In many important cases, it is necessary or desirable to use numbers larger than 2**32 for the results of certain inquiry functions or input/output operations. This is particularly true in programs that use very large arrays or files with a very large number of records. An analysis of the current specifications for input/output specifiers that use integer values reveals several irregularities. For example, the NUMBER and RECL specifiers in the INQUIRE statement are limited to default integer values. However, the unit number and the RECL specifier in the OPEN statement can use any KINDs of integer. The Fortran standard should remove these limitations and irregularities. Technical Specification and Syntax Allow the use of any integer KIND that is defined on the processor for the results of intrinsic procedures that return integer values and for the I/O specifiers that use integer values. Add an optional KIND=scalar-integer-initialization-expr argument to the following intrinsic procedures. COUNT LEN MINLOC SHAPE INDEX LEN_TRIM SCAN UBOUND LBOUND MAXLOC SIZE VERIFY Extend all keywords for I/O specifiers to use any integer KIND. This includes the keyword specifiers in the following list. ID IOSTAT NUMBER RECL IOLENGTH NEXTREC POS SIZE References 00-007r3, Fortran 2000 Draft 00-308, When Default KIND Isn't Good Enough [End of J3 / 00-350]