Peter Shenkin wrote:
> Hi,
>
> On Fri, 20 Feb 2004, 10:35pm +0100, [log in to unmask] wrote:
>>Peter Shenkin wrote:
>>>I've worked on not only VMS, but also CMS. If you want
>>>your code to issue system calls in these, and UNIX, too,
>>>you have to have some sort of conditional compilation
>>>mechanism.
>>
>>Ah, but that's a different question
> No, it is *the* question we have been discussing.
>
> Van was saying that C is less portable than Fortran,
> and as evidence he cited large numbers of #ifdefs he
> sees in C code, and large numbers of macro defs.
>
> I responded that these are mostly to accommodate
> OS system-call differences to obtain facilities that
> neither Fortran nor C provide as part of the basic
> language definition.
Ah, I think here our ways part. You should not forget
that I have to deal with GCC (a several million line C
program) daily.
I can assure you that most #ifdef's in that code don't
have any link to "differences in OS-call structures".
> Aside from this, I see no greater portability for
> Fortran than for C, and in some regards I see less
> for Fortran.
The greater portability of Fortran code - in my experience -
is the result of being less focussed on the OS interface.
Nowhere does the Fortran Standard make assumptions about
how data is transferred to/from disk, tape, wire (whether POTS
or something more advanced).
That's it's *strength*. We don't need to write device drivers
in Fortran - that's adequately covered by other languages.
--
Toon Moene - mailto:[log in to unmask] - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)
|