C vs. FORTRAN

Ian Dall idall at augean.OZ
Sat Aug 12 01:02:44 AEST 1989


I think I'm going to regret this posting but...

In article <14014 at lanl.gov> jlg at lanl.gov (Jim Giles) writes:
>
>be simple to represent.  For numerical computations, Fortran does this
>better than C.  Consider, for example, a routine to do matrix multiply
>on arbitrary sized and shaped matrices - both C an Fortran require the
>programmer to express the iteration explicitly, but only C requires the
>index calculations to be done explicitly.

It's been a long while since I programmed in FORTRAN but I did do quite
a lot of it once and I know of know way of handling arbitrary shaped
multidimensioned arrays in FORTRAN. You are not thinking of a vendor
specific enhancement are you? Or maybe one of these new fangled versions
of FORTRAN do indeed have such support.

LOTS of FORTRAN subroutines use indicies of the form I*XDIM + J
and if that isn't explicit index calculation I don't know what is!
-- 
 Ian Dall           life (n). A sexually transmitted disease which afflicts
                              some people more severely than others.
idall at augean.oz



More information about the Comp.lang.c mailing list