Hello Mike,
Thank you very much for your reply.
On Wed, 5 Mar 2003, Michael Metcalf wrote:
>On Wed, 5 Mar 2003, I wrote:
>>
>> FORALL allows, optionally, a scalar logical expression as
>> the last argument, similar to, e.g., SUM. But with SUM
>> this optional argument has the name MASK; not so with FORALL.
>> Why? This seems to be inconsistent to me.
>
> You have nearly answered the question yourself. The FORALL is a *statement*
> that has a syntax, including an optional mask that is an array-valued
> expression. It is in the same class as the DO or SELECT CASE statements. On
> the other hand, SUM is an intrinsic *function* with actual arguments.
OK, I see the point. I didn't properly distinguish between 'Statement'
and 'Intrinsic Function'. But still the question remains why the mask
in FORALL couldn't be an optional argument of a subroutine or function
that sometimes is present and sometimes not. (The same question would
apply to the stride in a DO construct.) So far I found out that the
NAG and the Intel F95 compilers do not allow the use of the FORALL mask
as an optional argument of a routine, but IBM's XLF95 does allow it!
Has this to be considered an extension to the standard?
Thanks again,
Roland
+----------------------------------------------------------------------+
| Roland Schilling Home-Office: +49(89)32929-670 |
| Max-Planck-Institut für Gravitationsphysik Phone: +49(89)32905-265 |
| -- Albert-Einsten-Institut -- Fax: +49(89)32905-200 |
| D-85748 Garching E-mail: [log in to unmask] |
| Germany http://www.geo600.uni-hannover.de |
+----------------------------------------------------------------------+
|