News for hackers. Stuff that matters.
Re:Subtraction is not comparison by SamReidHughes on Friday December 26, 2014 @12:11AM (#8798125)
You just write a function that returns -1, 0, or 1. It's not specific to C, it's in any language that has fixed-size types.

Another reason (a lame one) to return -1, 0, or 1 is that often the caller expects one of those return values for some reason (because the caller is dumb and your comparison function is replacing another one that behaved that way).

There are no comments on this comment yet.