Hi Friends,
I'm back. What's that I hear, a groan? Grin. Since "nice" is a vague word,
I don't know what is nice about "!strcmp()." But if we're talking about
readability and aesthetic appeal, I would love to change C. Call me a nit-
picker. But if I wanted to find out whether two strings were identical, I'd
want to use an equal sign in my "if" statement.
Say I need to keep using strcmp(). Then I might define constants to stand
for values that strcmp() returns. I could write:
if (strcmp(s1, s2) == SAME)
puts ("They're the same.");
else
puts ("They differ.");
I'm no expert in C, but I'm a perfectionist about readability. Though my
idea me not please an expert C programmer, it tells my readers what I mean.
What do you think?
Best wishes,
Bill