Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c Subject: Re: goto's and switch statements -- mild proposal Message-ID: <8413@mimsy.UUCP> Date: Fri, 4-Sep-87 16:56:53 EDT Article-I.D.: mimsy.8413 Posted: Fri Sep 4 16:56:53 1987 Date-Received: Sat, 5-Sep-87 20:37:28 EDT References: <855@tjalk.cs.vu.nl> <2683@hoptoad.uucp> <916@haddock.ISC.COM> <732@spar.SPAR.SLB.COM> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 31 >In article <8394@mimsy.UUCP> I mentioned: >>Please do not declare sprintf `char *' if you can avoid it. It will >>soon be `int', if it is not already `int' on your machine. In article <732@spar.SPAR.SLB.COM> hunt@spar.SPAR.SLB.COM (Neil Hunt) writes: >And what, pray, will be the value returned by such an integer sprintf ? >I suppose it will be the number of characters printed, Yes. >or something else equally useless. (Like its first argument?) >What about all my code where I do something like: > > f = fopen(sprintf(buf, filename, seq_num++), ...); It has to become (void) sprintf(buf, filename, seq_num++); f = fopen(buf, ...); >This seems like a gratuitous change to me ! Nonetheless, it is in the draft standard. System V does it this way, so someone is stuck with a change; it seems likely to be those of us with `char *sprintf()'s. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris