Newsgroups: comp.os.msdos.djgpp Subject: Re: %d From: you AT somehost DOT somedomain (Herman Schoenfeld) Organization: Your Organization References: MIME-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII NNTP-Posting-Host: 139.134.41.45 Message-ID: <34268326.0@139.134.5.33> Date: 22 Sep 97 14:39:34 GMT Lines: 29 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk >Relax, you will *never* get a crash with `printf' because of this. > >In fact, altough ANSI C permits it, I'd advise against declaring *any* >functions (even with constant argument lists) with shorts or floats as >one of the arguments; I suggest to always use ints and doubles instead. Why not shorts? ie, if you wanted a memcpy routine word writes then void memcpy(char *to, char *from, int len) { len /=sizeof(short); char *t = (short *) to; char *f = (short *) from; while(len--) { *t++=*f++ }; }; whereas if you knew your buffers would %4 void memcpy(char *to, char *from, int len) { len /=sizeof(int); char *t = (int *)to; char *f = (int *)from; while (len--) { *t++=*f++; }; };