Title: Pointer function references as actual arguments Submitted by: Aleksandar Donev Status: For Consideration References: Interp 000074 Basic Functionality: Allow references to functions returning an associated pointer to appear as actual arguments associated with INTENT(OUT) dummies. This is parallel to the way we treat regular pointers. Example: FUNCTION storage(key) RESULT(loc) INTEGER, INTENT(IN) :: key REAL, POINTER :: loc loc =>... END FUNCTION ! Make the following legal CALL RANDOM_NUMBER(storage(10)) Rationale: The proposed change makes the language more symmetrical. It arose while looking at an interpretation request, number 000074, titled "TARGET dummy arguments and POINTER expressions", which decided that in Fortran 2003 function results are not definable even when they are pointers associated with a TARGET. However, the functionality of allowing code like the one in the example above is needed in the language, and also, there is inconsistency with the way pointer variables are treated. Estimated Impact: As interp 000074 showed, the standard is already a little murky on whether function results are definable, so I think the changes to the standard will be small. The cost to implementations will be small. Detailed Specification: The text which describes argument association has problems in that it often confuses the actual argument with the "thing" the dummy is associated with, and once that text is clarified I believe the above example will become legal by miracle. History: Comments: Malcolm Cohen, Nihon NAG, Tokyo: (1) I have been sent two related Fortran 2003+ suggestions, which I would like the U.K. panel to consider. They are both from Aleksandar Donev. My opinion is that we should definitely put the first one (pointer_args) forward, as the current situation is rather peculiar (the dummy argument is associated with the variable pointed to by a pointer function reference actual argument, but is not definable even though it is associated with a variable). P.S. If we do decide to put them forward I think the text and examples need a little work. I'm willing to help with that. John Reid, JKR Associates, Oxford: I will advocate that we go for both of these. It seems to me to be illogical to go for one and not the other. Malcolm Cohen, Nihon NAG, Tokyo: (2) I am in favour of "pointer args".