#: 4662 S3/Languages
26-Jun-90 19:09:26
Sb: #4656-thanks to all
Fm: Pete Lyall 76703,4230
To: SCOTT HOWELL 70270,641 (X)
Scott -
It doesn't return a FALSE, per se. It returns a difference of 0. If the
characters mismatch at some point, it'll return a positive if the difference
was positive, and the same for negative.
For clarity, some people like to declare a MACRO to take care of the logic:
#define STREQ(x,y) (strcmp(x,y) == 0)
This way, you could use:
if STREQ(onestring, theotherstring)
blah_blah(blah);
Pete
|