"for" loops (was Re: C++ vs. Modula2)
Barry Margolin
barmar at think.COM
Tue Jan 31 06:32:51 AEST 1989
In article <1381 at X.UUCP> john at frog.UUCP (John Woods) writes:
]In article <19579 at agate.BERKELEY.EDU>, bowles at eris.berkeley.edu (Jeff A. Bowles) writes:
]> If I had a nickel for every time, in Fortran,
]> that I needed a loop that ran from 0.0 to 1.0 by 0.1 (or the like)
]...you'd be broke. You NEVER need a loop that runs from 0.0 to 1.0 by 0.1.
]1/10 is a repeating fraction in binary
Just because Fortran can't do it doesn't mean that he doesn't NEED it;
it just means he can't GET it. Since the real world mostly works in
decimal, I imagine that the need is frequent. Luckily, there are
well-known and easy ways around this problem.
Barry Margolin
Thinking Machines Corp.
barmar at think.com
{uunet,harvard}!think!barmar
More information about the Comp.lang.c
mailing list