History
Early toolsmiths writing in C under Unix began developing idioms at a rapid rate to classify characters into different types. For example, in the ASCII character set, the following test identifies a letter:
if ('A' <= c && c <= 'Z' || 'a' <= c && c <= 'z')However, this idiom does not necessarily work for other character sets such as EBCDIC.
Pretty soon, programs became thick with tests such as the one above, or worse, tests almost like the one above. A programmer can write the same idiom several different ways, which slows comprehension and increases the chance for errors.
Before long, the idioms were replaced by the functions in .
Read more about this topic: C Character Classification
Famous quotes containing the word history:
“All history attests that man has subjected woman to his will, used her as a means to promote his selfish gratification, to minister to his sensual pleasures, to be instrumental in promoting his comfort; but never has he desired to elevate her to that rank she was created to fill. He has done all he could to debase and enslave her mind; and now he looks triumphantly on the ruin he has wrought, and say, the being he has thus deeply injured is his inferior.”
—Sarah M. Grimke (17921873)
“The History of the world is not the theatre of happiness. Periods of happiness are blank pages in it, for they are periods of harmonyperiods when the antithesis is in abeyance.”
—Georg Wilhelm Friedrich Hegel (17701831)
“My good friends, this is the second time in our history that there has come back from Germany to Downing Street peace with honour. I believe it is peace for our time. We thank you from the bottom of our hearts. And now I recommend you to go home and sleep quietly in your beds.”
—Neville Chamberlain (18691940)