K
Kenneth Brody
[... Braces around blocks of code within a function ...]Richard said:Mark McIntyre said:
No, it doesn't. For one thing, it doesn't have a return type. For another,
it doesn't have type names in the parameter list. For a third, it has a
semicolon in a crucial place. For a fourth, when it is properly indented
it is blindingly obvious that it's code, because C doesn't have nested
functions.
Well, some compilers do have nested functions as an extension.
Also, old-style function declarations do not need to specify a
return type, nor parameter types, as they will default to "int".
This is perfectly legal, AFAIK, at least in C90:
foo(bar,baz)
{
return bar+baz;
}
Yes, if you squiggle up your eyes just so, you can sometimes trick them
into seeing the corner of your room look as if the walls recede from the
corner, going away from you into the distance. But it's a hard illusion to
maintain, and you can't do it for very long, and in the meantime you can
lean on the wall anyway.
It seems you are easily amused.
Well, it would have some "interesting" results in a compiler that
does support nested functions. (If you "accidentally" deleted the
semicolon, that is.)
--
+-------------------------+--------------------+-----------------------+
| Kenneth J. Brody | www.hvcomputer.com | #include |
| kenbrody/at\spamcop.net | www.fptech.com | <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------+
Don't e-mail me at: <mailto:[email protected]>