Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!nrl-cmf!cmcl2!lanl!jlg
From: jlg@lanl.gov (Jim Giles)
Newsgroups: comp.lang.fortran
Subject: Re: *THE GENERAL CASE* (was: function side effects)
Message-ID: <3980@lanl.gov>
Date: 21 Sep 88 23:23:39 GMT
References: <3999@h.cc.purdue.edu>
Organization: Los Alamos National Laboratory
Lines: 33

From article <3999@h.cc.purdue.edu>, by ags@h.cc.purdue.edu (Dave Seaman):
> In article <3821@lanl.gov> jlg@lanl.gov (Jim Giles) writes:
>>If you want to talk about side effects in general - fine.
>>Read section 1.4 of the standard document.  
> 
> I already have.  It supports my position that side effects are allowed
> except where specifically prohibited.  [...]

Which is what I said as well.  So what is the basis of your argument.
I have _never_ claimed that side effects couldn't be done in the general
case.  Until _you_ claimed that I had, I hadn't even _mentioned_ the 
general case!  And as for section 1.4 of the standard - I am one of the most
frequent supporters of allowing extensions.  As I've repeatedly pointed
out: pointers, 31 character names, bit functions, etc. are all extensions
allowed in CFT77 on Crays - and _NOT_ONE_ of these feartures makes the
compiler non-standard.

What your original position was is hard to judge.  It seems to me that
your original submissions were claiming that Fortran didn't prohibit
side effects in _any_ context.  (After all, _you_ were the one who posted
the remark that functions were allowed to change their arguments.  You
posted that remark in response to an article in which I claimed that
the functions in A(F(I))=A(F(I))+1 couldn't.  Well, they _can't_!)

As for having side effects in the general case - go ahead, all you want.
I do it all the time.  My most common method of writing non-arithmetic
subroutines is to write them as functions instead and return an error
flag as the function value.  So I seldom write subroutines at all, and
MOST of my functions have side effects - but none of them used in the
original context of this discussion do!
 
J. Giles
Los Alamos