Liste des Groupes | Revenir à theory |
olcott <polcott333@gmail.com> writes:I explained it better the first fifty times I said it.
[...]You are essentially asking sum(3,2) to return the"sum" is a valid C identifier. Nothing in the rules of C says
sum of 5 + 7. Can you see how asking sum(3,2)
to return the sum of 5 + 7 is incorrect according
to the rules of arithmetic?
that naming a function "sum" is incorrect, regardless of what that
function does.
This:--
int sum(int x, int y) { return 12; }
is a perfectly valid C function. You might get a non-fatal warning
that the parameter values aren't used, so you could try this equally
valid C function:
int sum(int x, int y) { return x + y + 7; }
Perhaps I have three functions named "cogito()", "ergo()", and
"sum()", and they perform some operations that make sense in the
context of the application of which they're a part.
Since there was no reference to the name "sum" in the article to
which you replied, it's difficult to tell what point you're trying
to make. Try making it more directly, without pretending that the
name "sum" has some meaning in the context of C.
When you make arguments based your understanding of C, you usually
get something wrong. It creates distractions and makes it difficult
to follow your reasoning.
Les messages affichés proviennent d'usenet.