Print

Print


> Date: Sat, 29 Nov 1997 18:47:44 -0500
> From: "Simon G. Smith" <[log in to unmask]>

> Hey, I have all the love in the world for Fortran, but since when is C
> "not highly portable"?  I'm monitoring a project to add F90 features to
> a F77 code, and I'm seeing all kinds of compiler dependent results, and
> not in the libraries (C's weakness) but rather in the language features
> (derived types, pointers, allocatable arrays, and the combination of
> these).  

I would argue that these usually aren't language problems.  Most of the time
thaty are either compiler bugs or non-standard coding practices.  If you'd 
like to list features of the language that are compiler-dependent, I, for one,
would stop using those features.

I've run into a fair number of portability problems, and
only two I can recall immediately are truly language problems, and one is
arguably a "quality of implementation" problem and the vendor promised it was
fixed in the next release.

> I'm forced by management to use F90, so our project will make the best
> of it, and take advantages of F90's strengths.  However, I think I'd
> have a much more portable code using ANSI C.

One thing to keep in mind is that Fortran90 compilers are, on aaverage, 
newer than ANSI C compilers, and aren't all 'up to snuff' yet.

I've run into very few C programs (ANSI or otherwise) that compiled and
ran identically on different platforms without any porting effort.  

Recently, the GNU `configure' program has helped a great deal on this 
front, but the effort to make a C program `configure'able can be substantial.
I have no idea if `configure' can be used with Fortran programs, although I
do have experience trying to use `cpp' on different platforms with Fortran
code and it is a pain, and `cpp' is at the heart of `configure'.

> Simon

David


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%