Why I use C instead of FORTRAN

Roberto Shironoshita shirono at grasp.cis.upenn.edu
Tue Feb 2 09:56:34 AEST 1988


In article <257 at tolsun.oulu.fi> jto at tolsun.UUCP (Jarkko Oikarinen) writes:
> In article <3597 at sdcc6.ucsd.EDU> (Tom Stockfish) writes:
> >In C you can write interactive programs
> >in which you input complex commands which are then parsed and
> >executed. In fortran you write programs which just prompt
> >you to input x and y and then
> >follow a fixed regimen. ...
> Which command(s) FORTRAN is(are) missing that make interactive 
> programs impossibility? 

Interactive programs are not an impossibility in FORTRAN.  It so
happens that the "interactive" part of a FORTRAN program is usually
sub-optimal or simple.  The answer is good _standard_ libraries.
That's where C's main power resides (aside from being a very small
language).  It is the standard libraries that usually do most of the
work (unless you don't inted to have your program ported to other
types of machines).
 
> For serious number-crunching I think FORTRAN is superior to C.

I agree.

However, it is still possible to give a (moderately?) complex user
interface to such a program, by coding the number-crunching routines
in FORTRAN, and the I/O in C.  Of course, this implies that it is
possible to obtain FORTRAN object code symbols (function names) using
the C compiler (like appending an `_' at the end of the C lexeme), or
viceversa.  I know it is possible to do such a thing under Ultrix (we
have a graphics package written in FORTRAN, which interfaces with
students' graphics programs written in C).  I would hope it is
possible to do under System V, but I'm not sure.


                                   Roberto Shironoshita

-----------------------------------------------------------------------
Disclaimer 1:  The opinions expressed here are my own.  The University
	       need not share them, or even be aware of them.
Disclaimer 2:  Like most humans, I'm bound to err at times.  I believe
	       what I have said, but agree that I may be wrong.

  @@@@@@@@@\         Full Name:    Roberto Shironoshita
   @@     @@         Occupation:   BSE candidate in Computer Science
   @@     @@         Organization: University of Pennsylvania
   @@@@@@@@/
   @@                Network Address:
   @@                    PENNnet:  shirono at eniac.seas
  @@@@                   Internet: shirono at eniac.seas.upenn.edu



More information about the Comp.lang.c mailing list