Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!nike!sri-spam!parcvax!hplabs!hp-sdd!ncr-sd!ncrcae!ncsu!mcnc!rti-sel!dg_rtp!throopw From: throopw@dg_rtp.UUCP (Wayne Throop) Newsgroups: net.lang.c Subject: Re: is a void function invocation an expression or a statement? Message-ID: <518@dg_rtp.UUCP> Date: Thu, 14-Aug-86 18:51:55 EDT Article-I.D.: dg_rtp.518 Posted: Thu Aug 14 18:51:55 1986 Date-Received: Sun, 17-Aug-86 05:25:36 EDT References: <501@bunny.UUCP> <500@copper.UUCP> <273@watmath.UUCP> Lines: 25 Summary: It's an expression > jack@mcvax.uucp (Jack Jansen) > Something that has been bothering me since I read the C standard (well, > read.... paged through it), and came up again after this discussion > is the following: why haven't the C standardisers treated void like > in algol-68? There, void is a fullfledged type, having only one > value, also called void. I'm not so sure they didn't, in effect and intent, if not in so many words. The real differences from what you describe seem to be only two. C's void type has no legal values at all, rather than just one. And no objects may be of type void (though expressions can be). > Are there any good reasons for not making void a normal type? Well, in putting it the way they do, X3J11 avoid the problem of what happens if you try to take the address of a void object. Even in Algol, this is probably anomalous, since a void object (only one legal value) can be stored in zero bits, so where you allocate it is sort of, well, arbitrary, isn't it? -- The importance of information is directly proportional to its improbability. -- Wayne Throop !mcnc!rti-sel!dg_rtp!throopw