Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!hplabs!otter.hpl.hp.com!hpltoad!cdollin!kers From: kers@hplb.hpl.hp.com (Chris Dollin) Newsgroups: comp.std.c Subject: Re: bsearch of empty array Message-ID: Date: 16 May 91 11:20:21 GMT References: <16167@smoke.brl.mil> Sender: news@hplb.hpl.hp.com (Usenet News Administrator) Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 17 In-Reply-To: gwyn@smoke.brl.mil's message of 15 May 91 22:59:36 GMT Nntp-Posting-Host: cdollin.hpl.hp.com Doug Gwyn says (replying to my bsearch question): In general, when the C standard requires an argument to a library function to be a pointer to an array of XXX, it means it. Null pointers are allowed only where specified. Thanks, Doug. I don't like it (in the case I described), but I can live with it. I've now read 4.1.6 and found the bit that outlaws $NULL$. Now, which implementations have better ``quality'' - those that are happy with a null pointer and no elements (where the meaning is ``obvious''), or those that object (and hence force your code to be more portable) .... :-) -- Regards, Kers. | "You're better off not dreaming of the things to come; Caravan: | Dreams are always ending far too soon."