home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
- From: jlg@cochiti.lanl.gov (Jim Giles)
- Subject: Re: Small Language Wanted
- Message-ID: <1992Aug28.181327.25214@newshost.lanl.gov>
- Sender: news@newshost.lanl.gov
- Organization: Los Alamos National Laboratory
- References: <DAVIS.92Aug23010605@pacific.mps.ohio-state.edu> <H.3lvmyc56w&A@lionbbs.bs.open.de> <1992Aug27.181926.5677@alchemy.chem.utoronto.ca> <9224107.5975@mulga.cs.mu.OZ.AU> <DAVIS.92Aug27211418@pacific.mps.ohio-state.edu> <DAVIS.92Aug28015332@pacific.mps.ohio-state.edu> <9224117.23480@mulga.cs.mu.OZ.AU> <1992Aug28.153021.1358@newshost.lanl.gov>
- Date: Fri, 28 Aug 1992 18:13:27 GMT
- Lines: 27
-
- In article <1992Aug28.153021.1358@newshost.lanl.gov>, jlg@cochiti.lanl.gov (Jim Giles) writes:
- |> In article <9224117.23480@mulga.cs.mu.OZ.AU>, fjh@cs.mu.OZ.AU (Fergus Henderson) writes:
- |> |> [...]
- |> |> The compiler must generate code that has the *same effect* as
- |> |> simply converting to double and then calling pow(), but it is
- |> |> quite free to substitute any equivalent code which may be more
- |> |> efficient, for example by converting the call to a couple of inline
- |> |> multiplications.
- |>
- |> The above is literally true only if it's the language standard `pow'
- |> function that's being called. If a user supplied `pow' is to be used
- |> it would probably be quite inapproptiate for the compiler to optimize
- |> the call in the way described here. [...]
-
- I apologise for posting this incorrect statement. In fact, all library
- function names in ANSI standard C are reserved - the user can't define
- his own. So the above comment only applies to old K&R implementations
- which allow the user to do so. (It's what I get for remembering an old
- public review copy of the C standard better than the final version.)
-
- This policy of C will probably come back to haunt them: suppose the next
- standard wants to add new functions to the standard library? Reserving
- the names will result in breaking any user codes which happen to have
- functions with those new names.
-
- --
- J. Giles
-