Difference between revisions of "Case sensitivity"

From PEGWiki
Jump to: navigation, search
(Created page with "'''Case sensitivity''' occurs when data, particularly strings, which differ only in letter case, are considered different. An algorithm or function that exhibits case sensiti...")
 
m (concrete strings, not abstract)
 
Line 1: Line 1:
'''Case sensitivity''' occurs when data, particularly [[string]]s, which differ only in letter case, are considered different. An algorithm or function that exhibits case sensitivity is said to be '''case-sensitive'''; one that does not is said to be '''case-insensitive'''. For example, the Pascal compiler is case-insensitive, because every reserved word and every identifier may be typed in uppercase, lowercase, or mixed-case, with no difference whatsoever to the meaning. On the other hand, when Pascal compares strings encoded in [[ASCII]], the strings '''a''' and '''A''' are considered to be unequal, with '''A''' being smaller, so we say that this comparison is case-sensitive.
+
'''Case sensitivity''' occurs when data, particularly [[string]]s, which differ only in letter case, are considered different. An algorithm or function that exhibits case sensitivity is said to be '''case-sensitive'''; one that does not is said to be '''case-insensitive'''. For example, the Pascal compiler is case-insensitive, because every reserved word and every identifier may be typed in uppercase, lowercase, or mixed-case, with no difference whatsoever to the meaning. On the other hand, when Pascal compares strings encoded in [[ASCII]], the strings <code>'a'</code> and <code>'A'</code> are considered to be unequal, with the latter being smaller, so we say that this comparison is case-sensitive.

Latest revision as of 20:24, 5 March 2011

Case sensitivity occurs when data, particularly strings, which differ only in letter case, are considered different. An algorithm or function that exhibits case sensitivity is said to be case-sensitive; one that does not is said to be case-insensitive. For example, the Pascal compiler is case-insensitive, because every reserved word and every identifier may be typed in uppercase, lowercase, or mixed-case, with no difference whatsoever to the meaning. On the other hand, when Pascal compares strings encoded in ASCII, the strings 'a' and 'A' are considered to be unequal, with the latter being smaller, so we say that this comparison is case-sensitive.