Re: New style DO syntax?



Brooks Moses wrote:
Ken Plotkin wrote:

Why don't you just write your own language, instead of proposing
destructive changes to one you don't understand?


I can't imagine that Joe would get nearly the quality of discussion about his proposals if he were to do that. The benefit of these threads isn't that the proposals have any chance of making it into Fortran in their proposed form just because they're mentioned here, but that they inspire a conversation about what the benefits and disadvantages of adding them might be.

Personally, I find that this sort of conversation tends to significantly improve my understanding of the existing language.


Actually, I am hoping that some of my suggestions make it into the language. One reasonable example that I think has gotten some interest is the idea of something like an "implicit none" for procedures. Many Fortran90 external procedures can be called incorrectly just by not knowing the interface, causing some strange bugs.

In the case of a new DO syntax, it seems to make total sense with all the rest of Fortran. I am not suggesting some wild non-Fortran-like loops, but just to add parenthesis to the DO construct, and to add a statement form:

DO I=1,10
N(I)=1
END DO

becomes:

DO (I=1,10)
N(I)=1
END DO

or, in a short statement form:

DO (I=1,10) N(I)=1

I suggested doing away with label-DO for the new style DO because none of the other block constructs have it. Of course, the old style DO would still be valid indefinitely.

The parenthetic DO could include an end label something like this:

DO (I=1,10,END=100)
N(I)=1
100 CONTINUE

However, I would expect that all other block constructs should then have the same option for using an end label.

Joe
.



Relevant Pages

  • Re: Recycled scientists
    ... CPMD is written in Fortran. ... tell you its fine, ii) all the guys who tell you your proposal is crap, but they all find different things to complain about. ... try to read funded proposals and see what they have and learn from those. ... if their grants don't get funded, and if there is bad politics around, and they get grants anyway, they can still get the short trip to the dumpster. ...
    (sci.research.careers)
  • Re: Recycled scientists
    ... CPMD is written in Fortran. ... try to read funded proposals and see what they have and learn from those. ... Then the field become hot and the citations of that paper grew rapidly. ... So, if at NSF you don't succeed, try, try again. ...
    (sci.research.careers)
  • Re: Pointer arithmetic with C_F_POINTER
    ... Fortran does not support pointer arithmetic. ... the single largest objection to the whole C interop facility of F2003, ... shot down by vehement objections from people who noticed that this made ... revive the C_LOC and C_F_POINTER proposals (once I pointed out how that ...
    (comp.lang.fortran)
  • Re: Fortran 77 vs Fortran 90/95
    ... Fortran 95 is quite different from FORTRAN 77. ... a quarter of those proposals are approved, ... standard will be much more complex than Fortran 2003. ... OTHO, Fortran 95 compilers are, as a rule, much bigger ...
    (comp.lang.fortran)