🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #4606

Re: "for" loops (was Re: C++ vs. Modula2)

#4606
From: John Woods
Date: Mon, 30 Jan 1989 06:57
13 lines
1232 bytes
In article <19579@agate.BERKELEY.EDU>, bowles@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, and thus .1+.1+.1+.1+.1+.1+.1+.1+.1+.1
does NOT equal 1.0.  Read "The Elements of Programming Style" for more tidbits
on this and other programming topics.
-- 
John Woods, Charles River Data Systems, Framingham MA, (508) 626-1101
...!decvax!frog!john, john@frog.UUCP, ...!mit-eddie!jfw, jfw@eddie.mit.edu

Presumably this means that it is vital to get the wrong answers quickly.
		Kernighan and Plauger, The Elements of Programming Style
Technical Details
Message-ID: <1381@X.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!mirror!frog!john
References: <INFO-M2%89011219330825@UCF1VM> <739@jupiter.iis.UUCP> <19579@agate.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!mirror!frog!john
From: john@frog.UUCP (John Woods)
Newsgroups: comp.lang.modula2,comp.lang.c
Subject: Re: "for" loops (was Re: C++ vs. Modula2)
Message-ID: <1381@X.UUCP>
Date: 30 Jan 89 06:57:00 GMT
References: <INFO-M2%89011219330825@UCF1VM> <739@jupiter.iis.UUCP> <19579@agate.BERKELEY.EDU>
Organization: Servants of the Great White Frog
Lines: 13