Why does F90 allow for both generic and specific names? First, generic names are easier to remember and use. When we write
{} abs(x)we understand that the compiler checks the type of the argument x. If it is is integer, then the compiler will substitute ABS (the generic name) with a call to IABS (the specific name); and similar for other types.
However, there are situations when the name of the function is not followed by arguments. For example, we can write a user-defined plot subroutine, which takes an intrinsic function f(x), evaluates it at and plots the graph (x,f(x)). We will invoke our subroutine with, say,
{} call my_plot( abs )to plot (x,ABS(x)) for between and , and will invoke it as
{} call my_plot( sin )to plot (x,SIN(x)) for between and . F90 allows the use of function names (ABS, SIN) as arguments in (another) procedure call. In these instances, the intrinsic function name is not followed by arguments. The compiler does not know which absolute value function to use (will ABS be called with integer, real or complex arguments in MY_PLOT? What if MY_PLOT is in a different file, which is compiled separately?) In consequence, it is the user's responsability to replace the generic name with the secific one when the intrinsic function name is a procedure argument.