home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!statoil!fou.tr.statoil.no!bhso
- From: bhso@fou.tr.statoil.no (Bjorn Halvor Solberg)
- Subject: Re: Small Language Wanted
- Message-ID: <1992Sep1.113610.2351@statoil.no>
- Sender: usenet@statoil.no
- Nntp-Posting-Host: und21.fou.tr.statoil.no
- Reply-To: bhso@fou.tr.statoil.no
- Organization: Statoil R&D, Trondheim
- References: <DAVIS.92Aug23010605@pacific.mps.ohio-state.edu> <DAVIS.92Aug27211418@pacific.mps.ohio-state.edu>
- Date: Tue, 1 Sep 1992 11:36:10 GMT
- Lines: 47
-
- In article <DAVIS.92Aug27211418@pacific.mps.ohio-state.edu>,
- davis@pacific.mps.ohio-state.edu ("John E. Davis") writes:
- > In article <9224107.5975@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU
- (Fergus James HENDERSON) writes:
- > Any function that is part of the standard library is a "built-in"
- function.
-
- Well, I would rather say that any function that is properly prototyped is a
- "built-in" function.
-
- > Hmm... don't bet on it. Let's see:
- [... program deleted ...]
-
- > [8:52pm] /net/pacific/4/davis>cc t.c -lm
- > [pacific]
- > [8:52pm] /net/pacific/4/davis>./a.out
- > 1.000000 = pow(2.000000, 4)
- >
- >
- > This was compiled on a sun sparc station.
- >
- > Also note that all the comments and documentation in the world couldn't have
- > saved this program.
-
- The above simply proves you don't have an ANSI C compiler, or at least not ANSI
- C header files. I compiled the same program on a Solbourne which is SPARC
- compatible, and got this result:
-
- 16.000000 = pow(2.000000, 4)
-
- The only thing I did was to exchange "#include <math.h>" with "double
- pow(double, double);", because our header-files aren't ANSI C yet either. Need
- an upgrade. :-) Conclusion: The compiler needs to know the types of the
- arguments the function takes (naturally), and once it knows that it is
- perfectly
- able to do type conversion itself.
-
- > _____________
- > #___/John E. Davis\_________________________________________________________
- > #
- > # internet: davis@amy.tch.harvard.edu
- > # bitnet: davis@ohstpy
- > # office: 617-735-6746
- > #
-
- BJorn.
-
-