09-257r3 To: J3 From: Malcolm Cohen Subject: Feature list Date: 2009 August 12 1. Introduction --------------- There are several new features missing from the feature list. Some of the new features on the list are suboptimally described. This has been revised twice, thanks to Van for finding some of the additional new features missing from the list. The second revision adds even more missing features, plus an edit to fix the unacceptable vagarity of the "extra intrinsic functions" feature. 2. Discussion ------------- This all started when I found three missing new features, but by the time I got around to writing them down I had forgotten two of them. So I started to trawl through my pile of old J3 papers looking for new features not on the list. I managed to find only one of the two I had forgotten. However, I found lots more that were missing. I am still moderately convinced that the list is not complete - that there is at least one more still missing. Some of the ones found are quite trivial, but those are precisely the ones that would be overlooked by an implementor upgrading an F2003 compiler to F2008. 3. Intrinsic functions ---------------------- The item "There are many more intrinsic functions" is too vague, and does not fit with the tedious detail provided for other intrinsic procedure changes. An edit is provided to remedy this. 4. Edits to 09-007r2 -------------------- [xiii,p2,item "Module enhancements:"] Append new sentence "Data objects and procedure pointers declared in a module implicitly have the SAVE attribute." {MISSING FEATURE 4.} [xiii,p2,item "Performance enhancements:"] Replace entire item after the subtitle with "The DO CONCURRENT construct provides a means for the program to specify that individual loop iterations have no inter-dependencies. The CONTIGUOUS attribute provides a means for the program to specify restrictions on the storage layout of pointer targets and assumed-shape dummy arguments." {None of the "permits" things are accurate - these are not giving permission to do anything describable in the standard, and you cannot give permission in the Introduction anyway.} [xiii,p2,item "Data declaration:"] Insert new penultimate sentence to item "Subscripts and nested implied-do limits inside a can be any constant expression instead of being limited to combinations of constants, implied-do variables, and intrinsic operations." {MISSING FEATURE 2.} [same item] "Allocatable components" -> "An allocatable component"; "FORALL index variables can have their" -> "A FORALL index variable can have its". {We are supposed to use the singular, not the plural.} [same item] In the last sentence, insert at the end "within the construct". {Extra explanation: they were already allowed to be explicitly declared outside the construct, it's just that that had undesirable effects.} [same item] "inferred from" -> "implied by". {Since these are "implied-shape", we should use the same terminlogy.} [same item] Append "The TYPE keyword can be used to declare entities of intrinsic type." {MISSING FEATURE 10.} [same item] Append "Multiple type-bound procedures can be declared in a single type-bound procedure statement." {MISSING FEATURE 14.} [xiii,p2,item "Data usage and computation:"] After the title insert new sentences "A structure constructor can omit the value for an allocatable component. SOURCE= in an ALLOCATE statement can give an array variable the bounds as well as the value of an expression." {MISSING FEATURES 1 AND 2.} [same item] "shape and type" -> "shape, type, and type parameters". {Only applies to deferred type parameters, but it does apply.} [same item] "another variable" -> "an expression". {MOLD= does not require a variable.} [same item] "Pointer functions" -> "A pointer function reference"; {We are supposed to use the singular, not the plural, and it is the function reference that denotes a variable, not the function itself.} [xiii,p2,item "Input/output:"] After "writing", "records" -> "output". {I don't see any reason this is limited to record files, and also these facilities can be used within a record with nonadvancing output to write parts of records in csv format even when the whole record is not.} [same item] Before "transfers" insert "data". {Makes it marginally easier to read - and we call them data transfers everywhere else so should do so here.} [xiii,p2,item "Execution control:"] "contains declarations" -> "can contain declarations". {It is not required to, the important thing is the capability.} [same item] After "has been changed" insert "to accept a constant expression instead of merely a literal constant, and" {MISSING FEATURE 13.} [xiii,p2,item "Intrinsic procedures:"] Delete "There are many more intrinsic functions.". {Unacceptable vagarity.} [same item] "hyperbolic trigonometric intrinsic functions" -> "intrinsic functions ACOS, ASIN, ATAN, COSH, SINH, TAN, and TANH". {MISSSING FEATURE 12; the list was incomplete, unless you think ACOS is hyperbolic.} [same item] Append "The intrinsic functions LGE, LGT, LLE, and LLT can have arguments of ASCII kind." {MISSING FEATURE 9.} [same item] Insert "new" before: "intrinsic subroutine EXECUTE_COMMAND_LINE", "intrinsic function FINDLOC", "intrinsic function STORAGE_SIZE". {It is not sufficiently clear which intrinsics are new and which have just been tweaked.} [same item] Insert approximately alphabetically: "The new intrinsic subroutines ATOMIC_DEFINE and ATOMIC_REF define and reference a variable atomically." {MISSING FEATURE 15.} [same item] Turn the item into a nested list of the functions in approximately alphabetic order with the following text included: "The new intrinsic functions ACOSH, ASINH, and ATANH calculate the inverse hyperbolic cosine, sine, and tangent respectively. The new intrinsic functions BESSEL_J0, BESSEL_J1, BESSEL_JN, BESSEL_Y0, BESSEL_Y1, and BESSEL_YN calculate Bessel functions. The new intrinsic functions BGE, BGT, BLE, and BLT perform bitwise comparisons. The new intrinsic functions DSHIFTL and DSHIFTR calculate combined left and right shifts. The new intrinsic functions ERF, ERFC, and ERFC_SCALED calculate the error function and its complement. The new intrinsic functions GAMMA and LOG_GAMMA calculate the gamma function and its log. The new intrinsic function HYPOT calculates the Euclidean distance. The new intrinsic function IMAGE_INDEX converts cosubscripts to an image index. The new intrinsic functions IALL, IANY, and IPARITY reduce an array with the bitwise AND, bitwise OR, and bitwise exclusive OR functions respectively. The new intrinsic functions LCOBOUND and UCOBOUND return the cobounds of a coarray. The new intrinsic functions LEADZ and TRAILZ return the number of leading and trailing zero bits in an integer. The new intrinsic functions MASKL and MASKR return simple left and right justified masks. The new intrinsic function MERGE_BITS performs a bitwise merge using a mask. The new intrinsic function NORM2 calculates the L_2 norm of an array. The new intrinsic function NUM_IMAGES returns the number of images. The new intrinsic function PARITY reduces an array with the .NEQV. operation. The new intrinsic functions POPCNT and POPPAR return the number of 1 bits of an integer and its parity. The new intrinsic functions SHIFTA, SHIFTL and SHIFTR perform shift operations. The new intrinsic function THIS_IMAGE returns the index of this image or cosubscripts for it." {Remove vagarity.} [xiv,p2,item "Programs and procedures:"] "Internal procedures" -> "An internal procedure"; "actual arguments" -> "an actual argument"; "Impure elemental procedures process arrays" -> "An impure elemental procedure processes array arguments"; {We are supposed to use the singular, not the plural; and it is only array arguments that are processed in array element order, not local arrays used internally to the procedure.} [same item] After (new text from above) "an actual argument" insert " or procedure pointer target". {MISSING FEATURE 11.} [same item] After "in generic resolution." insert new sentence "Procedureness of a dummy argument is used in generic resolution." {MISSING FEATURE 5.} [same item] Before "A null pointer" insert new sentence "An actual argument with the TARGET attribute can correspond to a dummy pointer." {MISSING FEATURE 6.} [same item] Append "The SUBROUTINE and FUNCTION keywords can be omitted from the END statement for a module or internal subprogram." {MISSING FEATURE 7.} [same item] Append "A line in the program is permitted to begin with a semi-colon." {MISSING FEATURE 8. This one is totally trivial, but no-one is going to implement it unless they know about it!} [xiv,p3-] Insert new paragraph "Additionally, the ENTRY feature present in Fortran 77 onwards is now deemed to be obsolescent by this part of ISO/IEC 1539." {Making ENTRY obsolescent is hardly an extension to F2003, but it is a change so we ought to mention it here.} ===END===