Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site steinmetz.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!ittatc!dcdwest!sdcsvax!ncr-sd!ncrcae!ncsu!uvacs!edison!steinmetz!davidsen From: davidsen@steinmetz.UUCP (Davidsen) Newsgroups: net.lang.c Subject: Re: Re: structured assembler (BASIC) [R Message-ID: <718@steinmetz.UUCP> Date: Thu, 1-May-86 17:20:11 EDT Article-I.D.: steinmet.718 Posted: Thu May 1 17:20:11 1986 Date-Received: Sun, 4-May-86 04:26:22 EDT References: <584@ihdev.UUCP> <1700007@umn-cs.UUCP> Reply-To: davidsen@kbsvax.UUCP (Davidsen) Organization: GE CRD, Schenectady, NY Lines: 42 In article <1700007@umn-cs.UUCP> herndon@umn-cs.UUCP writes: > > I disagree. Sizeof is definitely NOT a function. It is a builtin >of the C language, but it is not and could not be written as a function >(well...), just as return is definitely not a function. Actually sizeof is a unary operator. It applies to the following object, when object is defined as: a variable name a variable type (including all struct and pointer types) the object of indirection of a pointer type Examples: int ka, kb[10], *kc; struct foo sa, *sb; All the same (part 1): sizeof int sizeof (int) sizeof ka sizeof (ka) sizeof *kc sizeof (*kc) (however, sizeof kb == 10*sizeof int) All the same (part 2): sizeof struct foo sizeof (struct foo) sizeof sa sizeof (sa) sizeof *sb sizeof (*sb) -- -bill davidsen seismo!rochester!steinmetz!--\ / \ ihnp4! unirot ------------->---> crdos1!davidsen \ / chinet! ---------------------/ (davidsen@ge-crd.ARPA) "Stupidity, like virtue, is its own reward"