Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site kuling.UUCP Path: utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!genrad!panda!talcott!harvard!seismo!mcvax!enea!kuling!gostas From: gostas@kuling.UUCP (G|sta Simil{/ml) Newsgroups: net.lang.c Subject: Re: how has C bitten you? Message-ID: <797@kuling.UUCP> Date: Sat, 31-Aug-85 19:15:34 EDT Article-I.D.: kuling.797 Posted: Sat Aug 31 19:15:34 1985 Date-Received: Thu, 5-Sep-85 06:53:20 EDT References: <228@investor.UUCP> <132@mcgill-vision.UUCP> <2702@sun.uucp> Reply-To: gostas@kuling.UUCP (G|sta Simil{/ml) Organization: The Royal Inst. of Techn., Stockholm Lines: 27 In article <2702@sun.uucp> guy@sun.uucp (Guy Harris) writes: >Procedure calls, however, are not such a context, so the >two procedure calls in > > bar(0); > bar((struct frobozz *)0); > >are very definitely *not* equivalent. In ANSI Standard C, there is a syntax >to specify that "bar" takes an argument of type "struct frobozz *"; if you >declared "bar" in such a manner, the two procedure calls would be equivalent. > > Guy Harris Is it also possible to give a NULL-pointer to a procedure as a parameter, if for example the procedure would return several values, and we are not interested in all of them? wait(0) works at least here (4.2BSD), but something like this does not: skip(fd, n) /* skip n bytes om streams that don't allow lseek() */ int fd, n; { (void)read(fd, 0, n); } G|sta Simil{ gostas@kuling.UUCP