Path: utzoo!attcan!uunet!pyrdc!pyrnj!rutgers!cs.utexas.edu!ut-emx!chpf127 From: chpf127@ut-emx.UUCP (J. Eaton) Newsgroups: comp.lang.fortran Subject: Re: i++, i+=1, i=i+1 Summary: i .ne. i + 1, ever; rules. Message-ID: <6036@ut-emx.UUCP> Date: 16 Sep 88 00:24:21 GMT References: <13566@mimsy.UUCP> <3629@lanl.gov> Organization: The University of Texas at Austin, Austin, Texas Lines: 34 In article <3629@lanl.gov>, jlg@lanl.gov (Jim Giles) writes: > From article <13566@mimsy.UUCP>, by chris@mimsy.UUCP (Chris Torek): > > Also agreed. Convenience, however, makes all the difference. I, as > > a reader, would much rather see as an English description the phrase > > `add 1 to i' than `evaluate i, evaluate the integer constant 1, add > > the values together, and store the result in the location named by i'. Certainly, since the second description, while complete, is rather wordy. The first, while it is a convenient shorthand, isn't sufficient as a description [see below]. > My english description of 'i = i + 1' _is_ "add 1 to i". Hmmm. Mine is: `Huh? This can't be.', or: `No, I'm afraid that's false.' Unless I know more about the rules of the language it doesn't really mean a whole lot (neither does ++, or +=, or even :-). Your description "add 1 to i" only takes care of the right hand side, and does nothing to explain what the heck the left hand side and the equals sign are doing. I need to know more than "add 1 to i" to carry out all that's required by either C or Fortran; I need the second description given above by Chris. But that's wordy, so I'll use a shorthand, i++ or i+=1 in C, or even i=i+1 if I happen to be using Fortran. In any case, as long as we've agreed on the rules, and have a sufficiently clear and unambiguous definition of them, we should be all right. Is the real problem simply that someone in this discussion doesn't like the rules? J. Eaton Not really doing anything UT Austin Department of Chemical Engineering with chemicals.