09-117 To: J3 From: Bill Long and John Reid Subject: UTI 154, KIND of VALUE in ATOMIC_DEFINE/REF Date: 2009 January 26 References: 09-007, 09-102 Discussion: UTI 154 points out that the KIND for a VALUE integer argument to ATOMIC_DEFINE or ATOMIC_REF is not specified, and that the wording describing the action of the subroutine is subsequently flawed. Because of the limited set of values for logical variables, there is no corresponding problem for VALUE arguments of type logical. The options provided by the editor are to specify the kind for VALUE or to modify the action description. Specification of the kind (as equal to atomic_int_kind) has the drawback of requiring explicit kind specification for integer literal constant arguments, since atomic_int_kind might be different from the default kind. For example, call atomic_define (i[3], 0) would effectively be disallowed, even though this is what the user would naturally write. This is also unnecessary for logical values, (where forcing the use of a kind specifier is even more unnatural) so is either unnecessarily restrictive or asymmetric. Therefore, the option of changing the action description is reflected in the edits below. ------------ Edits to 09-007: [337:24] Change the last sentence of the description of the ATOM argument in "13.7.20 ATOMIC_DEFINE ..." to "If its kind is the same as that of VALUE or its type is logical, it becomes defined with the value of VALUE. Otherwise, it becomes defined with the value of INT(VALUE,ATOMIC_INT_KIND).". [338:6-7] Change the last sentence of the description of the VALUE argument in "13.7.21 ATOMIC_REF ..." to "If its kind is the same as that of ATOM or its type is logical, it becomes defined with the value of ATOM. Otherwise, it is defined with the value of INT(ATOM,ATOMIC_INT_KIND).".