Should I convert FORTRAN code to C?
der Mouse
mouse at mcgill-vision.UUCP
Sun Jun 26 19:55:45 AEST 1988
In article <20340 at beta.lanl.gov>, jlg at beta.lanl.gov (Jim Giles) writes:
> In article <224 at raunvis.UUCP>, kjartan at raunvis.UUCP (Kjartan Pierre Emilsson Jardedlisfraedi) writes:
>> [...]
> The Problem is that 2-d arrays are not optimizable because they are
> immediately turned into pointer-to-pointer-to-data type of
> constructs.
Real 2-d arrays turn into pointer-to-array, not pointer-to-pointer. If
you have one of these dynamically-allocated arrays that have been
bandied about, which is really an array of pointers to blocks of data,
*that* is pointer-to-pointer.
>> ii) You can define your own data structures,
> This capability is NOT an adequate replacement for the complex data
> type. Complex is more than just a pair of reals, [...]
It's both more and less powerful. To put it another way, FORTRAN's
COMPLEX data type is NOT an adequate replacement for the ability to
define custom data types.
> No use of C programming constructs can do this: [FORTRAN example]
> C provides no way to even do this calculation without function calls.
Sure it does, it just takes a little more code than the FORTRAN
example. But that's a strawman anyway. For every such example, I can
write one in C that FORTRAN similarly "can't" do.
der Mouse
uucp: mouse at mcgill-vision.uucp
arpa: mouse at larry.mcrcim.mcgill.edu
More information about the Comp.lang.c
mailing list