Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!hc!lanl!jlg
From: jlg@lanl.gov (Jim Giles)
Newsgroups: comp.lang.fortran
Subject: Re: Side effects in functions - the special case
Message-ID: <4033@lanl.gov>
Date: 22 Sep 88 19:05:41 GMT
References: <4002@h.cc.purdue.edu>
Organization: Los Alamos National Laboratory
Lines: 16

From article <4002@h.cc.purdue.edu>, by ags@h.cc.purdue.edu (Dave Seaman):
> That is true, but in Fortran (unlike C), assignment is a statement, not an
> expression.  Therefore the rule you quoted does not apply to
> 
> A(INVERT(I)) = A(INVERT(I)) + 1

True.  This case is ambiguous (as I've said before).  But in C (unlike
Fortran) this construct is deliberately ambiguous.  I suspect that the
Fortran committee would prefer not to have left this hole in the
standard.  The C committee is aparently going to leave a lot of
ambiguous stuff in the ANSI C standard.  Myself, I would prefer that
the ambiguity be removed.  In the meantime, I will continue to regard
that construct as dangerous as if it were illegal.

J. Giles
Los Alamos