tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: style: clean up mentions of old-style C
Date: Sat, 15 Apr 2023 11:47:08 +0200
From: Roland Illig <roland.illig%gmx.de@localhost>
Message-ID: <bbfe844d-9f1e-bf71-e4d8-40039f008410%gmx.de@localhost>
| > * Use ANSI function declarations. ANSI function braces look like
| > * old-style (K&R) function braces.
| I don't know what 'ANSI function braces' are or how they might differ
| from 'old-style function braces'.
I wondered about that myself some time ago. The conclusion I came to
was that it was referring to where the '{' is put in a function definition.
Since K&R C had declarations between the ) after the parameters, and the
{ that started the code block, that '{' always went on a line by itself.
So, what I think this is saying, in about the most obscure way possible,
is that the '{' for a function block goes on a line by itself, after
the function name & arg list, rather than say:
int
main(int argc, char **argv) {
which is the location that the '{' goes in almost every other instance.
kre
Home |
Main Index |
Thread Index |
Old Index