Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 (Tek) 9/26/83; site tektronix.UUCP Path: utzoo!linus!vaxine!wjh12!genrad!decvax!harpo!eagle!hou5h!hou5g!hou5f!ariel!vax135!cornell!uw-beaver!tektronix!richl From: richl@tektronix.UUCP Newsgroups: net.lang.c Subject: Var args: a warning Message-ID: <1547@tektronix.UUCP> Date: Tue, 1-Nov-83 03:09:28 EST Article-I.D.: tektroni.1547 Posted: Tue Nov 1 03:09:28 1983 Date-Received: Fri, 4-Nov-83 07:13:52 EST Organization: Tektronix, Beaverton OR Lines: 24 I have seen some advocate using the following code: foo(fmt,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) char *fmt; int arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9; { /* code, of course */ } This will work fine on a vax. But I ran into trouble with code like this when porting dump to an 11/45 and 11/70. If one of your arguments is a long, as in "foo("d is %ld\n", (long)d)" then you can run into problems, because of course a long will take *two* of those "int" spots you reserved. Which makes any arguments following a long all pretty darn useless, unless you have a pretty specific routine that knows the 4th argument will always be a long. It will also confuse you when this happens to be part of your error detection routine and you rely on accurate output for debugging! Rick Lindsley richl@tektronix ...!tektronix!richl