J3/04-287r1 Date: 03 May 2003 To: J3 From: JOR/Matthijs van Waveren Subject: More Questions than Answers 1.0 Inquiry Functions The referenced definition of ``transformational function'' depends on the definition of ``elemental intrinsic function''. Can this be made to work by deleting ``intrinsic'' and de-bolding the remaining ``elemental function'' at [291:11]? Does the specification at [291:8-11] that arguments of intrinsic inquiry functions need not have defined values, need not be associated, and need not be allocated, apply to inquiry functions in Section 14? If so, we need to do something at [269:20-24], because the inquiry functions in Section 14 aren't intrinsic. Subgroup response: The inquiry functions of Section 14 are intrinsic (see [371:16]), and they are part of an intrinsic module. They have the characteristic that the arguments are permitted to be unallocated allocatables or pointers that are not associated. This is not in contradiction with [269:20-24], that mentions that the actual arguments of non-intrinsic inquiry functions cannot be unallocated allocatables or pointers that are not associated. Subgroup however does not feel that there is anything broken, and recommends not to take any action. 2.0 Purity of Subroutines At [291:15-16] we found it necessary --- or at least desirable --- to specify the purity of all intrinsic procedures. At [371:16] it is specified that the functions in Section 14 are pure, but the subroutines aren't mentioned. Should we add ``The elemental subroutines are pure; the nonelemental subroutines are not.''? Subgroup response: It is mentioned in [287:12], that 'An elemental subprogram is a pure subprogram', thus the first proposed addition is already covered. The second part of the sentence is expected not to be true, as we have proposed in 04-288, that the non-elemental subroutines IEEE_SET_FLAG and IEEE_SET_HALTING_MODE be made pure. Subgroup recommends that no action be taken. 3.0 IEEE_VALUE 3.1 Description The value of X is not used. Its kind type parameter value is used for generic resolution, and its shape is used for elemental-ness. Is it necessary to require that the value of X is defined? If X is a scalar pointer, is it necessary for it to be associated? If X is an allocatable scalar, is it necessary for it to be allocated? Can we at least add ``; its value need not be defined'' after ``real''? Can we add another sentence ``If it is a scalar pointer it need not be associated; if it is an allocatable scalar it need not be allocated.''? We would also need to do something at [269:20-24], because IEEE_Value is neither an inquiry function nor intrinsic. Subgroup response: The comments propose giving extra information, but not fixing anything in the standard. As we would only add anything if the standard requires fixing, subgroup recommends not to implement the proposal. 3.2 Note On the most-widely used platform, if IEEE_Value is implemented as an ordinary REAL function, it causes an exception when it is invoked with its CLASS argument having the value IEEE_Signaling_NaN. This makes it next to useless. If it is special-cased by the processor (yes, this is more work), so that when it constitutes all of the expr in an assignment-stmt, actual-arg or output-item it is implemented without using the FPU, maybe it won't cause an exception --- and thereby perhaps be useful. Can we add a note to that effect, as follows ? "IEEE_VALUE would be most useful if it were implemented in such a way that invoking it does not cause an IEEE_INVALID exception in cases where a reference to it constitutes the entire expr in an assignment-stmt, actual-arg or output-item. " Subgroup response: The comments above propose to add an advice to implementors to the text, and do not fix anything. Subgroup recommends not to implement the proposal. 4.0 Inquiry Function The definition of ``inquiry function'' is incorporated by reference into Section 14. Should it be incorporated here too? If so, we need to do something at [269:20-24], because the inquiry functions in Section 15 aren't intrinsic. Are all of the procedures in 15.1.2 pure? Subgroup response: The definition of 'inquiry function' is given in the glossary and in 13.1, and does not have to be repeated in section 14. The functions C_ASSOCIATED, C_FUNLOC, and C_LOC are called 'inquiry functions'. The inquiry functions are part of the intrinsic module ISO_C_BINDING, thus subgroup feels that [269:20-24] is best left alone. 5.0 03-282 What became of 03-282? Subgroup response: This will become an interpretation request.