how has C bitten you?
G|sta Simil{/ml
gostas at kuling.UUCP
Sun Sep 1 09:15:34 AEST 1985
In article <2702 at sun.uucp> guy at 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 at kuling.UUCP
More information about the Comp.lang.c
mailing list