Path: utzoo!utgpu!water!watmath!clyde!rutgers!super.upenn.edu!grasp.cis.upenn.edu!shirono From: shirono@grasp.cis.upenn.edu (Roberto Shironoshita) Newsgroups: comp.lang.c Subject: Re: Why I use C instead of FORTRAN Message-ID: <3233@super.upenn.edu> Date: 1 Feb 88 23:56:34 GMT References: <11440@brl-adm.ARPA> <3597@sdcc6.ucsd.EDU> <257@tolsun.oulu.fi> Sender: news@super.upenn.edu Reply-To: shirono@grasp.cis.upenn.edu (Roberto Shironoshita) Organization: University of Pennsylvania Lines: 48 In article <257@tolsun.oulu.fi> jto@tolsun.UUCP (Jarkko Oikarinen) writes: > In article <3597@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@eniac.seas @@@@ Internet: shirono@eniac.seas.upenn.edu