J3/06-141 Date: 2006/02/16 To: J3 From: Malcolm Cohen Subject: Simplified KIND selection References: Item J3-030, J3/04-240, J3/04-407r1, WG5/N1649. INTRODUCTION This paper proposes specifications, syntax and edits for simplified kind selection. REQUIREMENTS The requirement is to provide a simplified means to select the most commonly desired real and integer kinds. SPECIFICATIONS The standard will specify the names of several named constants in the ISO_FORTRAN_ENV intrinsic module. These named constants will have kind values for the representations described below. Named constants provided will be for the kinds of integers whose storage sizes are exactly 8, 16, 32, and 64 bits, and for the kinds of reals whose storage sizes are exactly 32, 64, and 128 bits. If the processor supports more than one representation with the specified size, it is processor-dependent which of those representations the named constant corresponds to. If the processsor does not support a particular representation, the value of the corresponding named constant will be one of two negative values specified by the standard. If the processor does not support a representation with the exact size requested or with any larger size, the value shall be -1. If the processor does not support a representation with the exact size requested, but does support a representation with a larger size, the value shall be -2. This proposal does not require the compiler to support any particular kind. Nor does this proposal specify the kind values, which remain processor-dependent. SYNTAX The names shall be: INT8, INT16, INT32, INT64, REAL32, REAL64 and REAL128. EDITS [360:17+] Insert new subclause "13.8.2.4a INT8, INT16, INT32, and INT64 The values of these default integer scalar named constants shall be those of the kind type parameters that specify an INTEGER type whose storage size expressed in bits is 8, 16, 32, and 64 respectively. If, for any of these constants, the processor supports more than one kind of that size, it is processor-dependent which kind value is provided. If the processor supports no kind of a particular size, that constant shall be -2 if the processor supports kinds of a larger size and -1 otherwise." [360:33+] Insert new subclause "13.8.2.8a REAL32, REAL64, and REAL128 The values of these default integer scalar named constants shall be those of the kind type parameters that specify a REAL type whose storage size expressed in bits is 32, 64, and 128 respectively. If, for any of these constants, the processor supports more than one kind of that size, it is processor-dependent which kind value is provided. If the processor supports no kind of a particular size, that constant shall be -2 if the processor supports kinds of a larger size and -1 otherwise." ===END===