> Why, apart from saving two keystrokes?
That is not true, because x could be very complicated expresion.
Dot_Product(x(n1+n2+n3:n4+n5,n6),x(n1+n2+n3:n4+n5,n6))
instead of
Dot_Prod(x(n1+n2+n3:n4+n5,n6))
> Hi David,
>
> Dprod would be an especially bad choice, since it is the name of an
> unrelated Fortran intrinsic.
>
> In general, many of the "new" f90 intrinsic names intentionally have
> more than 7 characters to avoid conflict with existing user f77
> procedures.
>
>
> Cheers,
> Bill
>
> This allows for easy-to-understand code (is `D' `DOT' or `DOUBLE'?) and
> is less likely to conflict with users' own routines.
>
Ok, why not Dot_Prod, this name has 8 characters and it has very clear
meaning. In C you can use other names through the command #define, but
in fortran it is not so easy, some times you need to use some functions
many times and if it is has very long name and also you have to repeat
useless information like in the case of Dot_Product(x,x) your code could
have a lot of characters that could be avoided.
Also the Dot_Product function could accept more than two vectors for
example: Dot_Product(x,y,z)
David
--
David R. Leal Valmana | Office: 10.1.02
Tel: (34)-916.24.93.14 | Fax: (34)-916.24.98.49
E-mail : [log in to unmask] | http://jupiter.uc3m.es/~david/
Universidad Carlos III de Madrid | Dpto. de Estadistica y Econometria
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|