K&R-style variadic functions
Matt Soucy
msoucy at csh.rit.edu
Tue Jul 17 19:30:40 PDT 2012
Definitely - I live in a very technologically-savvy dorm in college, and
when I encountered it for the first time nobody there had any idea what
it was.
...we did later find an old book in our library that had it, though.
-Matt
On 07/17/2012 02:39 PM, H. S. Teoh wrote:
> On Tue, Jul 17, 2012 at 08:07:08PM +0200, Paulo Pinto wrote:
>> On Tuesday, 17 July 2012 at 15:16:56 UTC, Regan Heath wrote:
> [...]
>>> So all K&R function declarations were <name>() with no parameters.
>>>
>>> R
>>
>> K&R was more than that.
>
> This modern C declaration:
>
> int main(int argc, char **argv) {
> exit(1);
> }
>
> is written thus in K&R:
>
> int main(argc, argv)
> int argc;
> char **argv;
> {
> exit(1);
> }
>
>
>> I guess most old timers here will agree with me that it was
>> not much more than glorified assembler in what concerns typing.
> [...]
>
> I guess you predate me. ;-) When I started learning C, it was already in
> the ANSI syntax, though there were enough K&R style code floating around
> that I've at least _seen_ K&R syntax. I'm guessing nowadays most people
> don't even know what K&R syntax is.
>
>
> T
>
More information about the Digitalmars-d
mailing list