Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!teknowledge-vaxc!sri-unix!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.fortran Subject: Re: Fortran vs C for computations Message-ID: <391@quintus.UUCP> Date: 13 Sep 88 09:09:22 GMT References: <1226@scolex> <3448@lanl.gov> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 30 In article <3448@lanl.gov> jlg@lanl.gov (Jim Giles) writes: >People keep saying that Fortran has no preprocessor. This is _not_ >true. Preprocessing is a textual substitution problem. It can be done >on _any_ sufficiently powerful text editor. Not only that, cpp can usually >be applied to any text file you have - including Fortran code. A pre- >processor _is_ unnecessary in a language standard - in fact, standardizing >would only complicate the compiler writer's job without actually enhancing >the language at all. (1) cpp need not exist on every system. It need not even exist on a system which has a C compiler. [For example, the DEC-10 C compiler did not have a separate cpp.] (2) cpp may be applied to any text file. True. cpp may be USEFULLY applied to Fortran code. FALSE. For example, consider the Fortran statement +0000000001111111111...77777777778+ +12345C7890123456789...01234567890+ | X = 'THIS IS ...ONG00123000| | & FORTRAN STRI...' 00124000| cpp doesn't know about Fortran continuation rules or sequence numbers. (3) If I develop a program on machine X and then later try to compile it on machine Y I need the *SAME* preprocessor on both machines. Giles is right that it doesn't have to be in the _language_ standard, but there _does_ have to be a preprocessor standard. Does anyone wonder why I treasure my copy of the public-domain Ratfor sources, or of the public-domain M4? Does anyone wonder why I _haven't_ bothered to get my own copy of cpp?