Article View: comp.lang.modula2
Article #4607Re: "for" loops (was Re: C++ vs. Modula2)
From: Dave Seaman
Date: Fri, 27 Jan 1989 19:09
Date: Fri, 27 Jan 1989 19:09
23 lines
1413 bytes
1413 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) and > had to use INTEGER to do it. Fortran does not require an integer. The control variable of a DO loop may be integer, real, or double precision. It is perfectly legal to write: REAL X . . . DO 10 X=0.0, 1.0, 0.1 . . . according to the current standard, but this has been recognized as a mistake which will probably be rectified in the next standard. You can't even tell how many iterations you will get from the DO statement above (10? 11? how do you know?). Why anyone would want to add this deficiency to a language that doesn't currently have broken FOR statements is beyond me. -- Dave Seaman ags@j.cc.purdue.edu
Technical Details
Message-ID:
<3747@s.cc.purdue.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!s.cc.purdue.edu!agsReferences:
<INFO-M2%89011219330825@UCF1VM> <739@jupiter.iis.UUCP> <1611@csuna.UUCP> <738@atanasoff.cs.iastate.edu> <19579@agate.BERKELEY.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!mentor.cc.purdue.edu!s.cc.purdue.edu!ags From: ags@s.cc.purdue.edu (Dave Seaman) Newsgroups: comp.lang.modula2,comp.lang.c Subject: Re: "for" loops (was Re: C++ vs. Modula2) Message-ID: <3747@s.cc.purdue.edu> Date: 27 Jan 89 19:09:13 GMT References: <INFO-M2%89011219330825@UCF1VM> <739@jupiter.iis.UUCP> <1611@csuna.UUCP> <738@atanasoff.cs.iastate.edu> <19579@agate.BERKELEY.EDU> Reply-To: ags@s.cc.purdue.edu (Dave Seaman) Organization: Purdue University Lines: 23