Article View: comp.lang.misc
Article #4507Re: Check the Arg Count
From: Wayne A. Christopher
Date: Tue, 13 Jan 1987 17:22
Date: Tue, 13 Jan 1987 17:22
16 lines
1366 bytes
1366 bytes
In article <1639@enea.UUCP>, sommar@enea.UUCP (Erland Sommarskog) writes: > To get I/O-routines (or whatever scanf() is) with variable parameter lists, > there seems to be four ways: > 1) Make them standard routines recognized by the compiler. The best alter- > native. Specially in a small langauge like C. > 2) Introduce a syntax that allows this. Possible, but not very attrcative. > 3) Skip checking of parameter count. To be straight: Ridiculous. > 4) Forget the whole thing. You're assuming that there is no use for variable argument lists besides printf() and scanf(). This isn't true -- I use them all the time... (Well, now and then....) Your solution (1) doesn't address this problem, solution (2) is already in C (it's called "varargs"), (3) is what C used to do, and (4) is unacceptable. Wayne
Technical Details
Message-ID:
<1220@ucbcad.berkeley.edu>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!ucbcad!faustusReferences:
<1634@enea.UUCP> <594@mcgill-vision.UUCP> <1639@enea.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!rutgers!ames!ucbcad!faustus From: faustus@ucbcad.berkeley.edu (Wayne A. Christopher) Newsgroups: comp.lang.misc Subject: Re: Check the Arg Count Message-ID: <1220@ucbcad.berkeley.edu> Date: Tue, 13-Jan-87 12:22:08 EST Article-I.D.: ucbcad.1220 Posted: Tue Jan 13 12:22:08 1987 Date-Received: Tue, 13-Jan-87 23:45:23 EST References: <1634@enea.UUCP> <594@mcgill-vision.UUCP> <1639@enea.UUCP> Organization: CAD Group, U.C. Berkeley Lines: 16