Path: utzoo!attcan!uunet!convex!killer!mit-eddie!uw-beaver!microsoft!jimw From: jimw@microsoft.UUCP (Jim Walsh) Newsgroups: comp.lang.c Subject: Re: Array indexing vs. pointers... Message-ID: <1016@microsoft.UUCP> Date: 12 Oct 88 02:40:31 GMT References: <836@proxftl.UUCP| <3105@hubcap.UUCP> <1700@dataio.Data-IO.COM> <8630@smoke.ARPA> <10699@ulysses.homer.nj.att.com> <171@umigw.MIAMI.EDU> Reply-To: jimw@microsoft.UUCP (Jim Walsh) Distribution: na Organization: Microsoft Corp., Redmond WA Lines: 26 In article <171@umigw.MIAMI.EDU> steve@umigw.miami.edu (steve emmerson) writes: >Nonsense. Use instead: >#define EPUTS(msg) (void)fputs(msg, stderr) > EPUTS("Usage: sltread [options] input-drive-name\n"); > EPUTS("Options: [-l] [-s] [-v] [-x] [-z] [-t tape-volume-number]\n"); > EPUTS(" [-d dataset-name] [-n dataset-number]\n"); > EPUTS(" [-i ignore-count] [-r record-count]\n"); > >This has all the advantages -- and none of the disadvantages -- of the other. >In ANSII-C you could even have the macro append the newline. I believe that ANSI C allows (at least the implementation I'm using does without flagging it in the manual as a deviation) fputs("Usage: sltread [options] input-drive-name\n" "Options: [-l] [-s] [-v] [-x] [-z] [-t tape-volume-number]\n" " [-d dataset-name] [-n dataset-number]\n" " [-i ignore-count] [-r record-count]\n", stderr); Thus you truly get ALL the advantages - a single function call, and even a few null bytes saved. -- Jim Walsh jimw@microsof.beaver.cs.washington.EDU Microsoft Corporation jimw@microsof@uw-beaver.ARPA jimw@microsof.UUCP The views expressed herein are not necessarily mine, let alone Microsoft's...