To: J3 J3/23-199 From: Malcolm Cohen Subject: Default kinds Date: 2023-June-14 1. Introduction Virtually all compilers have options to control what kinds the default kinds actually are, e.g. -r8 to change default Real kind to binary64. This proposal suggests that this could be done within the program unit, so that the essential information, about what the default kinds are, appears in the program source. 2. Proposal That a new statement be added to specify what the default kinds are. Things like EQUIVALENCE and COMMON would be reworded in terms of single and double precision for reals, etc., thus decoupling the default kind from storage association rules. The default kind would be used for literal constants with no kind-param, as well as those entities declared with a type-spec with no kind-selector. Any explicit kind specification overrides the default, just as it does today. Such a statement would appear in the program unit in the same place as the IMPLICIT statement. (Or maybe between USE and IMPLICIT?) 3. Illustrative syntax Nothing here is set in mud, let alone concrete. PROGRAM example DEFAULT(REAL=SELECTED_REAL_KIND(30)) REAL :: x = 1.23456789012345678901234567890 PRINT '(F0.29)',x END PROGRAM That would be expected to print a reasonably accurate approximation to the literal constant. ===END===