Article View: comp.lang.fortran
Article #6465Re: Implied do-loop statement, for the next FORTRAN?
From: Geoff Miller
Date: Mon, 05 Mar 1990 23:42
Date: Mon, 05 Mar 1990 23:42
23 lines
1738 bytes
1738 bytes
In article <MAINE.90Mar4094233@altair.dfrf.nasa.gov> maine@elxsi.dfrf.nasa.gov (Richard Maine) writes: >On 3 Mar 90 03:06:41 GMT, Clifton_RL@admdev.cut.oz said: >Clifton> IMPLIED DO-LOOP STATEMENT >Clifton> We could use the implied do-loop construction. For example: >Clifton> (((C(I,J)=A(I,K)*B(K,J) ,K=1,M) ,I=1,M) ,J=1,M) >Clifton> This clear statement would replace the familiar clutter of.... > >Its mostly just a matter of taste (which means others are sure to >disagree), but I find the DO-ENDDO to be clearer than the implied >DO construct you show. Longer, true, but I wouldn't call it cluttered. >Perhaps it's just because I'm used to it. >...Certainly you COULD write such things in an implied DO >notation, but I think they will be very hard to read.... I must agree with Richard. It comes back to the old arguments about maintainable code vs compact code, and there are many occasions where a succession of simple statements is far more comprehensible, albeit longer, than the compact form. This is the case with the DO loops dicussed above, and also with the IF-ENDIF structure. Of course, if you really like compact code you can always write in APL.... Geoff Miller ghm@cc.adfa.oz.au
Technical Details
Message-ID:
<1159@ccadfa.adfa.oz.au>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!csc!ccadfa!ghmReferences:
<2044.25efa542@admdev.cut.oz> <MAINE.90Mar4094233@altair.dfrf.nasa.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!csc!ccadfa!ghm From: ghm@ccadfa.adfa.oz.au (Geoff Miller) Newsgroups: comp.lang.fortran Subject: Re: Implied do-loop statement, for the next FORTRAN? Message-ID: <1159@ccadfa.adfa.oz.au> Date: 5 Mar 90 23:42:57 GMT References: <2044.25efa542@admdev.cut.oz> <MAINE.90Mar4094233@altair.dfrf.nasa.gov> Reply-To: ghm@ccadfa.adfa.oz (Geoff Miller) Organization: Computer Centre, Australian Defence Force Academy Lines: 23