To: J3 J3/26-109r1 From: Malcolm Cohen Subject: US16 Default kinds, edits Date: 2026-January-15 Reference: 25-007r1, 23-199r1, 25-191, 25-191r2, 26-108r1. 1. Introduction This paper has the edits for US16, Default kinds. See 23-199r1 for an introduction to this feature. 25-191r2 has the formal requirements and specifications. 25-191 has some additional discussion and background. 26-108r1 has the syntax. 2. Edits to 25-007r1 OPTIONAL (is this a major feature? I think so, but...) [xiv] Foreword, p8, new penultimate list item "- the default kinds of intrinsic types can be specified;". [xv] Introduction, p2, "Data declaration" bullet, add sentence "The DEFAULT KIND statement (8.6a) provides a way to specify the default kind values of intrinsic types." [6:32] 3.15 binding label, change "default character" to "system character". [24:26] 3.124.1 character sequence type, change "default character" to "system character". [24:30] 3.124.2 numeric sequence type, change "all default..., or" to "standard integer, standard logical, single precision complex, single precision real, double precision real, or". [26:16] 3.134.1 character storage unit, "default" -> "system". [26:19] 3.134.2 numeric storage unit, change "default real, default integer, or default logical" to "single precision real, standard integer, or standard logical". {This is incomplete, it can also hold half of a double precision value.} [26:22-23] 3.134.3 unspecified storage unit, change "not default character, default real, double precision real, default integer, default logical, or default complex" to "not system character, single precision real, double precision real, single precision complex, standard integer, or standard logical". [37:3] 4.3.4 Fortran 2018 compatibility, p2, "default integer" -> "standard integer". [38:19] 4.3.5 Fortran 2008 compatibility, p12, same change. [39:28] 4.3.6 Fortran 2003 compatibility, p11, same change. [40:10] 4.3.7 Fortran 95 compatibility, p2, "default kind" -> "system kind". [40:35] 4.3.8 Fortran 90 compatibility, p4, same change. [41:13-14] 4.3.9 FORTRAN 77 compatibility, first bullet, "default real" -> "single precision real", twice. [43:6+] 5.1 High level syntax, R504 specification-part, After "[ import-stmt ]..." insert "[ default-kind-stmt ]..." {Insert the new statement into the grammar.} [64:7] 6.3.3.1 General, of 6.3.3 Fixed source form(obsolescent), "default kind" -> "system kind". [71:9] 7.4.1 Classification and specification (in 7.4 Intrinsic types), p2, "default kind" -> "standard kind". [72:7-8] 7.4.3.1 Integer type, p2, replace entire paragraph with "The processor shall provide a standard integer kind, whose representation method has a decimal exponent range of at least five. At least one integer kind shall have a representation method with a decimal exponent range of at least 18; this may be the same kind as standard integer, or may be different." [72:10-11] Same subclause, p3, replace entire paragraph with "The keyword INTEGER with no kind-selector specifies type integer with default kind; if the default has not been changed (7.8a), this is standard integer kind. The kind type parameter value of default integer is equal to KIND (0)." [73:5+] 7.4.3.2 Real type, p1+, insert new paragraph "The processor shall provide a single precision real kind; it is recommended that its approximation method should have a decimal precision of at least six and a decimal exponent range of at least 37. The processor shall also provide a double precision real kind, whose approximation method has a decimal precision of at least ten and a decimal exponent range of at least 37. The decimal precision of the double precision real approximation method shall be greater than that of the single precision real method." [73:18,19-20] Same subclause, p5, Change "and the kind value is" to "; if the default has not been changed (7.8a), this is single precision real kind. The kind value of default real kind is". Delete the last sentence "The decimal... method.". That makes the whole paragraph read: "If the type keyword REAL is used without a kind type parameter, the real type with default real kind is specified; if the default has not been changed (7.8a), this is single precision real kind. The kind value of default real kind is KIND (0.0). The type specifier DOUBLE PRECISION specifies type real with double precision kind; the kind value is KIND (0.0D0)." [73:21-23] Same subclause, p6, delete whole paragraph "The decimal... 37.". [74:18] 7.4.3.3 Complex type, p2, delete "(default integer)". {This parenthetical is completely redundant with 7.4.1, deleting it means we do not need to correct it.} [75:19] 7.4.4.1 Character sets, p2, delete "(default integer)". {Redundant.} [75:30-31] Move p2 to follow p3, and change "and the kind value is" to "; if the default has not been changed (7.8a), this is the system character kind. The kind value of default character kind is". [75:32-76:2] 7.4.4.2 Character type specifier, p3, Change "The default character kind shall support a character set that includes" to "The processor shall provide a system character kind whose character set includes". Change "nondefault" to "nonsystem" thrice. [78:10] 7.4.4.4 Collating sequence, p2, "default" -> "system". [79:9-10] 7.4.5 Logical type, p2, replace first sentence with "The processor shall provide a standard logical representation method for data of type logical with a storage size the same as that of standard integer. Additional representation methods may be provided." In the second sentence, delete "(default integer)". [79:13-14] Same subclause, p4, change "the kind type parameter value is" to "if the default has not been changed (7.8a), this is standard logical kind. The kind type parameter value of default logical kind is". [82:7] 7.5.2.3 Sequence type, p1, Change "default integer, default real, double precision real, default complex, default logical" to "standard integer, standard logical, single precision real, double precision real, single precision complex". [82:9] Change "default character" to "system character". [138:1-] Immediately before 8.7 IMPLICIT statement, insert new subclause "8.6a DEFAULT KIND statement R866a default-kind-stmt is DEFAULT KIND ( default-kind-spec-list ) R866b default-kind-spec is basic-intrinsic-type-name = int-constant-expr R866c basic-intrinsic-type-name is REAL or INTEGER or LOGICAL or CHARACTER C894a The int-constant-expr in a default-kind-spec shall not depend on a property of the default kind of a type, unless that type has its default kind previously specified in the scoping unit or its default kind is not specified in the scoping unit. C894b The same basic-intrinsic-type-name in a default-kind-stmt shall not appear more than once in a scoping unit. C894c A default-kind-stmt shall appear only in the specification part of a program unit, interface body, or nested subprogram. C894d A default-kind-stmt shall not appear in a scoping unit that has a USE statement with a DEFAULT_KINDS clause. In a scoping unit, a DEFAULT KIND statement specifies the default kind for the intrinsic types listed in the statement. The default kind for type complex is always the same as the default kind for type real. If a USE statement with a DEFAULT_KINDS clause appears in a scoping unit, the default kinds for all intrinsic types within that scoping unit are the same as in the specification part of the referenced module. Otherwise, if no DEFAULT KIND statement specifies the default kind for an intrinsic type in a scoping unit, - if the scoping unit is a nested scoping unit other than an interface body, the default kind for the type within the scoping unit is the same as in its host; - if the scoping unit is a program unit or interface body, the default kind for the type is: - single precision kind for type real, - standard integer kind for type integer, - standard logical kind for type logical, or - system character kind for type character. NOTE An example of a DEFAULT KIND statement is DEFAULT KIND (INTEGER = SELECTED_INT_KIND(18)) " [146:28] 9.2 Variable, C906 after R906 default-char-variable, Change "default character" to "system character". [throughout the whole document] Rename BNF "default-char-variable" to "system-char-variable". {This is what achieves "ERRMSG= uses system character" as well as the output kind of i/o specifiers e.g. IOMSG= and most INQUIRE specifiers.} {NOTE TO J3: Renaming a BNF rule ineluctably renames any prefixed version, e.g. scalar-default-char-variable.} [182:14] 10.1.9.1 General of 10.1.9 Type, type parameters, and shape... C1008 after R1026 default-char-expr, Change "default character" to "system character". [throughout the whole document] Rename BNF "default-char-expr" to "system-char-expr". {And this does things like ACCESS=.} [187:10] 10.1.12 Constant expression [throughout the whole document] Rename "default-char-constant-expr" to "system-char-constant-expr". {And this does things like BIND(C,NAME=...).} [249:22] 12.4 Internal files, p2, first bullet, change "default" to "system". {Internal files can be system, ASCII, or ISO 10646 character kind.} [250:30] 12.5.1 Referring to a file, 2nd constraint C1202 after R1203 internal-file-variable, change "default" to "system". {FILE= in a data transfer statement.} [257:16] 12.5.6.16 RECL= specifier in the OPEN statement, change "default kind" to "system kind", and "nondefault characters" to "nonsystem characters". [259:bottom-3] 12.6.1 Form of input and output statements, NOTE 2, "default character variable" -> "system character variable". [261:23] 12.6.2.1 Syntax (in 12.6.2 Control information list), last constraint C1231 (R1214) The scalar-int-variable shall have... before "integer" change "default" to "standard". [262:12+4] 12.6.2.2 Format specification in a data transfer statement, NOTE, change "default character" to "system character". [267:9,10,11] 12.6.3 Data transfer input/output list, p10 "An input/output list shall not contain an effective item of" change "nondefault" to "nonsystem", change "internal file of default" to "internal file of system", change remaining "nondefault" to "nonsystem". [271:11] 12.6.4.5.2 Unformatted data transfer, p6, second bullet, change "default" to "system", twice. [273] 12.6.4.8.2 Defined input/output procedures, No change is needed to this subclause because the interfaces to the procedures are given as interface bodies, and interface bodies which don't use this feature act as they always did. [289:1] 12.10.2.27 RECL= specifier in the INQUIRE statement, after "only characters of" change "default" to "system". [300:3-4] 13.7.1 Purpose of data edit descriptors, p2, second bullet, change "default" to "system", twice. [300:8] Same subclause, p3, second bullet change "default" to "system". [300:13,14] Same subclause, p5, change "default" to "system" once, change "of default kind" to "of system character kind". [309:20+2] 13.7.4 Character editing, NOTE 1, change "nondefault" to "nonsystem". [311:19,20] 13.8.1.1 Position editing, p1, change "nondefault" to "nonsystem", change "default" to "system". [315:32] 13.10.3.1 List-directed input forms, p2, change "default" to "system". [316:23] Same subclause, p7, change "default" to "system". [316:24] Same subclause, p8, change "default" to "system". [327:12-13] 14.2.2 The USE statement and use association, R1409 use-stmt, After "module-nature ]" insert " [ , DEFAULT_KINDS ]" in each production. {Note: That probably leads to overly-long lines and ugliness. The editor should consider instead factoring out the module options as follows: (1) change "module-nature" to "module-options" (2) insert "R1409a module-options is [ , module-nature ] [ , DEFAULT_KINDS ]".} {Define DEFAULT_KINDS as a keyword here so we can hyperlink to it.} [327:26+] After C1405 about NON_INTRINSIC, insert new constraints "C1405a The DEFAULT_KINDS clause shall appear only in a program unit, interface body, or nested subprogram. C1405b The DEFAULT_KINDS clause shall appear in at most one USE statement in a scoping unit." [328:7+] After p3 "A use-stmt without a module-nature", insert new paragraph "If the DEFAULT_KINDS_clause appears, the scoping unit has the same default kinds for the intrinsic types as in the specification part of the module (ref 7.8a The DEFAULT KIND statement)." {I chose to put all the specs about default kinds there, so this is duplicative, but we need to say something here.} [349:12] 15.5.2.5 Ordinary dummy variables, p3, change "default kind" to "system kind". [349:14,17] Same subclause, p4, change "default kind" to "system kind", twice. [350:28] Same subclause, p14, change "default character" to "system character". {Not sure why we sometimes say "of type character with default kind" and sometimes just "default character", but now is not the time to think about word-smithing those.} [351:3+2] Same subclause, NOTE 2, change "default character" to "system character". [355:21] 15.5.2.12 Sequence association, p2, change "default character" to "system character". [355:22] Same subclause, p3, change "default or" to "system or". [355:28] Same subclause, p4, same change. [356:1] Same subclause, p5, same change. [368:18-19] 15.6.2.6 ENTRY statement (obsolescent), p4, Change "default integer, default real, double precision real, default complex, or default logical" to "standard integer, single precision real, double precision real, single precision complex, or standard logical". [386:12+ to 387:end] 16.8 Specific names for standard intrinsic functions, tables 16.2 Unrestricted specific intrinsic functions and 16.3 Restricted specific intrinsic functions, change "default real" to "single precision real", change "default complex" to "single precision complex", change "default integer" to "standard integer", change "default character" to "system character", throughout. [409:8] 16.9.54 CO_BROADCAST, p3 Arguments, ERRMSG argument, "default character" -> "system character". [409:30] 16.9.55 CO_MAX, p3 Arguments, ERRMSG argument, "default character" -> "system character". [410:14] 16.9.56 CO_MIN, p3 Arguments, ERRMSG argument, "default character" -> "system character". [411:6] 16.9.57 CO_REDUCE, p3 Arguments, ERRMSG argument, "default character" -> "system character". [411:38] 16.9.58 CO_SUM, p3 Arguments, ERRMSG argument, "default character" -> "system character". [416:12,16,20] 16.9.69 DATE_AND_TIME, p3 Arguments, in each of the DATE, TIME, and ZONE arguments, change "default character" to "system character". [422:28,423:7] 16.9.83 EXECUTE_COMMAND_LINE, p3 Arguments, in each of the COMMAND and CMDSTAT arguments, change "default character" to "system character". [427:20,428:6] 16.9.92 GET_COMMAND, p3 Arguments, in each of the COMMAND and ERRMSG arguments, change "default character" to "system character". [428:26,41] 16.9.93 GET_COMMAND_ARGUMENT, p3 Arguments, in each of the VALUE and ERRMSG arguments, change "default character" to "system character". [429:17,19,38] 16.9.94 GET_ENVIRONMENT_VARIABLE, p3 Arguments, in each of the NAME, VALUE, and ERRMSG arguments, change "default character" to "system character". [455:9] 16.9.147 MOVE_ALLOC, p3 Arguments, ERRMSG argument, change "default character" to "system character". [466:16] 16.9.169 RANDOM_SEED, p3 Arguments, SIZE argument, change "default integer scalar" to "scalar of type integer with a decimal exponent range of at least four". [466:18,21] Same subclause, PUT and GET arguments, change "default integer" to "standard integer". [472:26,29] 16.9.180 SELECTED_CHAR_KIND p3 Argument, "default character" -> "system character", p5 Result Value, insert new second sentence in between the ones about DEFAULT and ASCII: "If NAME has the value SYSTEM, then the result has a value equal to that of the kind type parameter of system character." [482:30-31,483:2,5-6] 16.9.202 SYSTEM_CLOCK, p3 Arguments, all arguments, change "default integer" to "standard integer". [493:17-] Immediately before 16.10.2.9 ERROR_UNIT, insert new subclause "16.10.2.8a DOUBLE_PRECISION The value of the standard integer scalar named constant DOUBLE_PRECISION shall be the kind type parameter of double precision real kind." [497:27-] Immediately before 16.10.2.28 STAT_FAILED_IMAGE, insert new subclauses "16.10.2.27a SINGLE_PRECISION The value of the standard integer scalar named constant SINGLE_PRECISION shall be the kind type parameter of single precision real kind. 16.10.2.27b STANDARD_INTEGER The value of the standard integer scalar named constant STANDARD_INTEGER shall be the kind type parameter of standard integer kind. 16.10.2.27b STANDARD_LOGICAL The value of the standard integer scalar named constant STANDARD_LOGICAL shall be the kind type parameter of standard logical kind. 16.10.2.27b SYSTEM_CHARACTER The value of the standard integer scalar named constant SYSTEM_CHARACTER shall be the kind type parameter of system character kind." [508-570] Clause 17 Exceptions and IEEE arithmetic, and clause 18 Interoperability with C, change "default integer" to "standard integer", change "default logical" to "standard logical", change "default character" to "system character", throughout. [522:26] 17.11.34 IEEE_REAL, p5 Result Characteristics, change "default real" to "single precision real". {All the other uses of the term "default real" in these clauses are correct.} [582:33] 19.5.3.2 Storage sequence, p2, item (1), change "default integer, default real, or default logical" to "standard integer, standard logical, or single precision real". [582:35] Same paragraph, item (2), change "default complex" to "single precision complex". [583:1,3] Same paragraph, items (3) and (4), change "default character" to "system character", twice. [584:11-14] 19.5.3.4 Association of scalar data objects, p7, change "default character" to "system character", twice. change "default complex" to "single precision complex", twice. change "default integer, default real, default logical," to "standard integer, standard logical, single precision real". [587:16-19] 19.6.5 Events that cause variables to become defined, items (13) and (14), change "default" to "single precision" six times. [592:29] A.2 Processor dependencies, bullet "in fixed source form,..." change "default" to "system". [592:36] bullet "the blank padding...", change "nondefault" to "nonsystem". [594:44] bullet "the effect of RECL=", same change. [595:45] bullet "the file position when..." change "nondefault" to "nonsystem", change "default" to "system". [598:24] B.1 Deleted features from Fortran 90, p2, (4), "default" -> "system". ===END===