Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site wu1.UUCP Path: utzoo!linus!philabs!cmcl2!rocky2!cubsvax!wu1!rf From: rf@wu1.UUCP Newsgroups: net.lang.c Subject: Why not a varargs declaration? Message-ID: <185@wu1.UUCP> Date: Mon, 31-Oct-83 16:58:47 EST Article-I.D.: wu1.185 Posted: Mon Oct 31 16:58:47 1983 Date-Received: Sun, 6-Nov-83 19:34:32 EST Organization: Western Union Telegraph, Mahwah, NJ Lines: 24 Maybe C should provide a standard way to pass a variable number of arguments to a function. One could provide a varags declaration: varargs f() . . . I'm aware that it would be difficult to provide a quick way to do this on all machines, but the capability seems useful enough so that the loss of execution time might be justifiable. It would, for instance, decrease the effort required to port an i/o library. A possible alternative might be to provide an Ada-like aggregate notation. Then one might write: fprintf (outfile, "%s %d\n", (@string, &i@)); The (@ . . . @) notation would assemble its arguments in ascending order in main memory. This might provide a fairly clean way to pass variable numbers of parameters. Randolph Fritz Western Union Telegraph