Re: Code as documentation
- From: garylscott@xxxxxxxxxxxxx
- Date: Wed, 23 Jan 2008 13:02:43 -0800 (PST)
On Jan 23, 2:49 pm, glen herrmannsfeldt <g...@xxxxxxxxxxxxxxxx> wrote:
mecej4 wrote:
Paul van Delst wrote:
(snip)
So ... X/Y*Z is looked upon with disfavour?This case is confusing because the Fortran meaning differs from that in
a mathematical text. In algebra, the convention is that a/bc means
<Fortran> a/(b*c) </Fortran>, as opposed to <Fortran> a*c/b) </Fortran>
As far as I know, a/bc in algebra means (a/b)*c, but in a
book you can write:
a
-----
b c
which means a/(b*c). You can't do that in Fortran.
I am not so sure that the current algebraic precedence wasn't
borrowed back from Fortran, though.
-- glen
http://en.wikipedia.org/wiki/Order_of_operations
I say we just follow this as closely as possible where possible and
where not, define explicitly the rule and reason for the exception.
.
- References:
- Code as documentation
- From: David Flower
- Re: Code as documentation
- From: Paul van Delst
- Re: Code as documentation
- From: mecej4
- Re: Code as documentation
- From: glen herrmannsfeldt
- Code as documentation
- Prev by Date: Re: Code as documentation
- Next by Date: Re: Code as documentation
- Previous by thread: Re: Code as documentation
- Next by thread: Re: Code as documentation
- Index(es):
Relevant Pages
|