Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!cmcl2!lanl!jlg From: jlg@lanl.ARPA (Jim Giles) Newsgroups: net.lang,net.lang.c Subject: Re: Re: Re: ... C builtin functions? Message-ID: <2323@lanl.ARPA> Date: Thu, 24-Apr-86 19:10:56 EST Article-I.D.: lanl.2323 Posted: Thu Apr 24 19:10:56 1986 Date-Received: Sat, 26-Apr-86 06:31:04 EST References: <41@cbmvax.cbmvax.cbm.UUCP> <824@ttrdc.UUCP> <202@chronon.UUCP> <359@uvacs.UUCP> <562@nsc-pdc.UUCP> Reply-To: jlg@a.UUCP (Jim Giles) Organization: Los Alamos National Laboratory Lines: 18 Xref: watmath net.lang:2396 net.lang.c:8733 In article <562@nsc-pdc.UUCP> joemu@nsc-pdc.UUCP (Joe Mueller) writes: >Sizeof is an operator, not a function. It's perfectly legal to say >"sizeof foo" (without the parens). An operator is a syntactic form that invokes a function! SIZEOF is clearly a function: it has a domain (actually two domains - data types and variables) and it has a range (the non-negative integers) and it provides a mapping from one to the other. Since that is the mathematical definition of the word 'function', it is clear that SIZEOF is one. Now, it is true that the syntactic description of C uses the term 'function' in a slightly more restrictive way. But the guy that wrote the syntactic description of C just picked 'function' as a convenient name for a grammar rule. If you take it too literally, you will start saying absurd things like "'+' is an operator and not a function." Most people I know would be quite surprised about that! J. Giles Los Alamos