[Dwarf-discuss] F9x elemental procedures

David Anderson davea
Tue Jun 7 19:00:57 GMT 2005

Comments based on my quick reading of parts of the standard follow.
I'll be interested if James or others think I've got it wrong
(I may well have).

James C
 >   (i.e. it is a function with scalar
 >   formals which can be applied to array actuals, with the effect of
 >   applying the procedure to every element of the array)

Chris Q:
>Can you tell me what "can be applied" means in this context?

It's like a for-loop (as described in F90 std)

>Is this describing a function body (code) that that has a special kind of
>function call interface?

It's like an implied-do in fortran io, but in this case
an implied loop-on-call. The function implementations take, for
example, a double as argument, yet the coder  codes an array
as the argument. and the generated code must iterate over
the elements calling once per element.

>Is this describing a function declaration that describes a compiler-builtin?

Yes, in some cases (at least one).
It's more like the implied-do of a non-builtin (?).

>Will a debugger be expected to call these functions in a special way
>if it has support for such "elemental" functions?

Looks to me like the debugger must do the iteration and call the
implementing function  once for each element. (hmm. well
it gets messy as some arg could be a scalar and other be
an array.)

I must admit I never noticed this feature of F90 before James
mentioned it.
David Anderson

More information about the Dwarf-discuss mailing list