Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: Expressions in initializers
Message-ID: <1991Mar5.172557.22863@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <17270@crdgw1.crd.ge.com> <760@ajpo.sei.cmu.edu> <1991Mar4.144939.8311@ux1.cso.uiuc.edu> <17294@crdgw1.crd.ge.com>
Date: Tue, 5 Mar 1991 17:25:57 GMT

In article <17294@crdgw1.crd.ge.com> volpe@camelback.crd.ge.com (Christopher R Volpe) writes:
>"The square root of two" can be evaluated at compile time, but "sqrt(2.0)"
>is an invocation of a function. How is the compiler supposed to know
>what sqrt is?

If <math.h> has been included, an ANSI C compiler may well have been
informed, by magic in it, that sqrt means "square root".

>I could have in another file:
>double sqrt(double x)
>{

Naughty, naughty.  The external identifiers in the ANSI C library, including
sqrt, are reserved; you redefine them at your peril.
-- 
"But this *is* the simplified version   | Henry Spencer @ U of Toronto Zoology
for the general public."     -S. Harris |  henry@zoo.toronto.edu  utzoo!henry
