Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!mephisto!mcnc!rti!xyzzy!goudreau From: goudreau@dg-rtp.dg.com (Bob Goudreau) Newsgroups: comp.lang.c Subject: Re: NOT Educating FORTRAN programmers to use C Message-ID: <2279@xyzzy.UUCP> Date: 18 Jan 90 23:24:45 GMT References: <4459@scolex.sco.COM> <14195@lambda.UUCP> Sender: usenet@xyzzy.UUCP Reply-To: goudreau@larrybud.dg.com (Bob Goudreau) Distribution: na Organization: Data General Corporation, Research Triangle Park, NC Lines: 46 In article <14195@lambda.UUCP> jlg@lambda.UUCP (Jim Giles) writes: >>>> The standard allows str*() to be built-in. >>>Most ANSI standards allow additional features to be implemented in >>>a conforming processor. I don't consider these extensions to be >>>an inherent part of the language. >> >> So, you don't consider PRINT, READ, WRITE, COS, SIN, etc., to be parts of >> FORTRAN? [...] > >Yes, I _do_ consider all the above features to be part of Fortran. They >are all _required_ by the existing standard. The _proposed_ ANSI C >standard on the other hand does not contain any such requirement for >'str*()'. Therefore, it is not an inherent part of the language. Many >Fortran implementations provide pointers - the standard allows such >extensions - but I don't consider pointers to be part of Fortran. Just >because the language standard _allows_ a feature, doesn't make that >feature a part of the language. Jim, I think you misunderstand the distinction between the standard library functions defined in the ANSI C Standard (which is no longer *proposed*, but *approved*) and "additional features". See section 1.7 of the Standard for details. The upshot is that the C Standard really defines two language translation standards: hosted and freestanding (think of them as along the same lines as full FORTRAN 77 and its standard subset (G?)). The former (hosted) is a superset of the latter and is of course by far the most popular -- most C users *want* the use of the standard library functions (unless they're writing a device driver or something at a similar low level) and most compilers provide them. And the ANSI Standard cleary states that a conforming hosted implementation is *required* to accept any strictly conforming program -- i.e., a program using "only those features of the language and library specified in this standard". So as far as hosted implentation go, the Standard goes far beyond just *allowing* the standard library functions to be available; it *requires* them to be there, and implementors are free to "build them in" to the compiler. In that respect, the str*() functions are as much an "inherent part of the language" of (hosted) ANSI C as PRINT, SIN, etc. are part of FORTRAN. -------------- Bob Goudreau +1 919 248 6231 Data General Corporation ...!mcnc!rti!xyzzy!goudreau 62 Alexander Drive goudreau@dg-rtp.dg.com Research Triangle Park, NC 27709, USA