Re: Help from fellow Fortran Users

From: glen herrmannsfeldt (gah_at_ugcs.caltech.edu)
Date: 01/27/04


Date: Tue, 27 Jan 2004 19:48:33 GMT

Richard Maine wrote:
(snip regarding portability and high/low level languages)

> So are some others. My viewpoint is more that C is the "peculiar"
> one here, though in a way that can be useful. I find C peculiar
> in that it isn't a very high-level language, but more of a
> semiportable assembler. But then, that's just as broad a generalization
> as the ones you have made. Neither yours or mine are really
> accurate.

Well, C more closely matches some low level machine characteristics.
I would much rather write bitmap graphics programs in C, for example.
Operating systems, compilers, device drivers, interrupt routines,
data compression programs, I believe are all easier to write in C.

I do know of one Fortran compiler (mostly) written in Fortran, but
that was written before C existed.

>>For whatever historical reasons, C is the portable language today,
>>and Fortran just ain't.

For number crunching, Fortran is probably about as portable, though
maybe a little more, than C.

Note, though, that some of the reason C is more portable is because
it has machine dependent construct, such as preprocessor macros
and typedef types that vary depending on the machine. Well understood
systems for writing code that varies such characteristics between
machines, and programs actually keeping track of the sizeof() various
data structures.

Numerical programs may be dependent on the precision of the floating
point implementation, but normally not much else.

-- glen



Relevant Pages

  • Re: Need Help: compiling old Fortran program
    ... dependent on specific compilers than Fortran). ... It is quite possible to write Fortran code that does not depend on ... I have to use only a subset of GINO for wider portability because the Windows versions are far more capable than the unix versions. ...
    (comp.lang.fortran)
  • Re: When will this ng come to accept that Fortran needs to go "back to the future" ?
    ... both standard Fortran and standard C portable by definition? ... dependent ... I certain that both the C and the Fortran standard hand a user ... enough rope to hang themself with portability issues. ...
    (comp.lang.fortran)
  • Re: Help from fellow Fortran Users
    ... >> department head winced and commented that Fortran is no longer being ... Portability, for programs written in any language, depends on four ... A compiler that generates code for an AXP platform is not ... Some programmers are just so impressed with their own knowledge of the ...
    (comp.lang.fortran)
  • Re: Help from fellow Fortran Users
    ... > Also, although Windows may outnumber Unix, Linux, and BSD in units sold, ... > more relevant to the issue of portability. ... consistent API to support fork() emulation. ... Variety and quality of Fortran ...
    (comp.lang.fortran)
  • Re: Is Fortran more accurate than Java ?
    ... Fortran is far more portable ... >> than Java since it doesn't specify a detailed arithmetic model. ... Portability has a variety of shadings. ... There are still plenty of machines for which it is a problem but they ...
    (comp.lang.java.programmer)