Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!lanl!lambda!jlg From: jlg@lambda.UUCP (Jim Giles) Newsgroups: comp.lang.misc Subject: Re: NOT Educating FORTRAN programmers to use C Message-ID: <14207@lambda.UUCP> Date: 23 Jan 90 23:59:12 GMT References: <15999@boulder.Colorado.EDU> Lines: 47 From article <15999@boulder.Colorado.EDU>, by ruede@boulder.Colorado.EDU (Ulrich Ruede): > In article <14205@lambda.UUCP> jlg@lambda.UUCP (Jim Giles) writes: >> [...] >>Dynamic memory >>struct types >>small integers (or even char) >>macros > > Let me add *block structure*. Fortran 90 has that too. Better than C's almost unreadibly invisible curly braces. Fortran 90 lets you label blocks too, so that EXIT and CYCLE statements can be multi-level. > [...] > No, I am trying to do some more than cosmetics. I am using constructs > like > FOR_ALL_NODES_OF(this_mesh, each_node) > each_node->component= 0; > END_ALL_NODES > > where *this_mesh* identifies the mesh, and *each_node* will be the > *loop index* (a pointer to the nodes). This technique allows me > to write most of my algorithms independent of the actual storage technique. So, what you _really_ want is something like FIDIL. FIDIL is a scientific programming language which lets you do things like the above directly. Your mesh doesn't have to be strictly rectangular either. The domain of the mesh can be pretty much any shape. FIDIL was designed for finite differencing with domain decomposition, but it has applications outside that field (like, apparently, yours). > [... NUMERICAL RECIPIES ...] > I don't have a copy available, but they use illegal alliasing in the > ODE-codes. If so, they can't expect their codes to work on the vast majority of Fortran implementations. I'll have to go take a look at my copy of the book. I don't think that such a large problem could really have slipped by during the publishing of such a book. J. Giles