Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site telesoft.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!talcott!panda!genrad!decvax!ittatc!dcdwest!sdcsvax!telesoft!pilotti From: pilotti@telesoft.UUCP (Keith Pilotti @shine) Newsgroups: net.lang.c Subject: Re: casts to (void) Message-ID: <168@telesoft.UUCP> Date: Wed, 31-Jul-85 04:25:41 EDT Article-I.D.: telesoft.168 Posted: Wed Jul 31 04:25:41 1985 Date-Received: Sat, 3-Aug-85 05:22:38 EDT References: <11@brl-tgr.ARPA> <> Reply-To: pilotti@telesoft.UUCP (Keith Pilotti @shine) Organization: TeleSoft, SanDiego CA Lines: 19 In article <> mjs@eagle.UUCP (M.J.Shannon) writes: >> Why should a cast to (void) be necessary in a statement like >> (void) printf("foo\n"); >>... >The cast is necessary because printf() returns a value. >... The use of (void) also points out the fact that the programmer *intentionally* is ignoring the return value of the function. At the very least it is useful documentation. /+\ Keith ________________________________________________________ KEITH F. PILOTTI -- TeleSoft (619) 457-2700 x172 10639 Roselle St, SanDiego, CA 92121 (UUCP) {decvax,ucbvax}!sdcsvax!telesoft!pilotti (ARPA) Pilotti@UCSD