🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5327

types of optional arguments in stdarg.h

#5327
From: Ray Butterworth
Date: Tue, 06 Sep 1988 14:04
19 lines
1230 bytes
In article <1067@xyzzy.UUCP>, meissner@xyzzy.UUCP (Michael Meissner) writes:
> Let me mention something that came
> up in our discussion:  Namely that it is desirable that you have two
> different forms of this, one for the times that you want the comma supplied
> if there are extra arguments, and the other for times when you don't want
> the comma.  Otherwise you could get compilation errors if no extra arguments
> were passed.

That reminds me of something I'd like to see as an extension
to the variable argument prototypes in some future version
of the Standard.

extern void func(type1, type2, ...);  /* usual meaning */

extern void func(type1, type2  ...);
                             ^
                             No comma.
The missing comma would indicate that all the optional "..." args
must have the same type as the second argument.
Technical Details
Message-ID: <20738@watmath.waterloo.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!rbutterworth
References: <438@ucsvc.unimelb.edu.au> <1067@xyzzy.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!rbutterworth
From: rbutterworth@watmath.waterloo.edu (Ray Butterworth)
Newsgroups: comp.std.c
Subject: types of optional arguments in stdarg.h
Message-ID: <20738@watmath.waterloo.edu>
Date: 6 Sep 88 14:04:41 GMT
References: <438@ucsvc.unimelb.edu.au> <1067@xyzzy.UUCP>
Organization: U of Waterloo, Ontario
Lines: 19