Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!purdue!i.cc.purdue.edu!h.cc.purdue.edu!ags From: ags@h.cc.purdue.edu (Dave Seaman) Newsgroups: comp.lang.fortran Subject: Re: i++, i+=1, i=i+1 Message-ID: <3979@h.cc.purdue.edu> Date: 16 Sep 88 15:21:13 GMT References: <3976@h.cc.purdue.edu> <3659@lanl.gov> Reply-To: ags@h.cc.purdue.edu.UUCP (Dave Seaman) Organization: Purdue University Lines: 21 In article <3659@lanl.gov> jlg@lanl.gov (Jim Giles) writes: >No, it doesn't cause the subscript to be evaluated twice. In Fortran >functions are not allowed to have side effects. May I suggest that you read the standard before making such statements? At least one variety of side effect is explicitly permitted by the standard. I quote the last paragraph of Section 15.5.1, "Function Subprogram and FUNCTION Statement": An external function in a function subprogram may define one or more of its dummy arguments to return values in addition to the value of the function. So far I have not found any statements concerning other varieties of side effects, either for or against. I do note that section 15.5.3, "Function Subprogram Restrictions", fails to mention any restrictions on side effects. -- Dave Seaman ags@j.cc.purdue.edu