language-icon Old Web
English
Sign In

Caret

The caret /ˈkærɪt/ is an inverted V-shaped grapheme. It is the spacing character ^ in ASCII (at code point 5Ehex) and other character sets that may also be called a hat, control, uparrow, or, less frequently, chevron, xor sign, 'to the power of' (exponent), pointer (in Pascal), or wedge. Officially, this character is referred to as circumflex accent in both ASCII and Unicode terminology (because of its historical use in overstrike), whereas caret refers to a similar but lowered Unicode character: .mw-parser-output .monospaced{font-family:monospace,monospace}U+2038 ‸ .mw-parser-output .smallcaps{font-variant:small-caps}CARET. Additionally, there is a lowered variant with a stroke: U+2041 ⁁ CARET INSERTION POINT. The caret and circumflex are not to be confused with other chevron-shaped characters, such as U+028C ʌ LATIN SMALL LETTER TURNED V or U+2227 ∧ LOGICAL AND, which may occasionally be called carets, too. The caret was originally and continues to be used in handwritten form as a proofreading mark to indicate where a punctuation mark, word, or phrase should be inserted into a document. The term comes from the Latin caret, 'it lacks', from carēre, 'to lack; to be separated from; to be free from'. The caret symbol is written below the line of text for a line-level punctuation mark, such as a comma, or above the line as an inverted caret (cf. U+02C7 ˇ CARON) for a higher character, such as an apostrophe; the material to be inserted may be placed inside the caret, in the margin, or above the line. A raised variant of the symbol can be found on some typewriters, where it is used to denote a circumflex in some languages, such as French and Portuguese. It is typically a dead key, which does not cause the carriage to advance and thus allows the following letter to strike the same spot (below the circumflex) on the paper. As regards computer systems, the original 1963 version of the ASCII standard reserved the code point 5Ehex for an up-arrow (↑). However, the 1965 ECMA-6 standard replaced the up-arrow with a circumflex (^), which was applicable as a diacritic as well, and two years later, the second revision of ASCII followed suit. As the early mainframes and minicomputers largely used teleprinters as output devices, it was possible to print the circumflex above a letter when needed. With the proliferation of monitors, however, this was seen insufficient, and precomposed characters, with the diacritic included, were instead introduced into appended character sets, such as Latin-1. The original circumflex character was left for other purposes, and as it did not need to fit above a letter anymore, it became larger in appearance. The caret has many uses in programming languages. It can signify exponentiation, the bitwise XOR operator, string concatenation, and control characters in caret notation, among other uses. In regular expressions, the caret is used to match the beginning of a string or line; if it begins a character class, then the inverse of the class is to be matched. ANSI C can transcribe the caret in the form of the trigraph ??', as the character was originally not available in all character sets and keyboards. C++ additionally supports tokens like xor (for ^) and xor_eq (for ^=) to avoid the character altogether. RFC 1345 recommends to transcribe the character as digraph '> when required. Pascal uses the caret for declaring and dereferencing pointers. In Smalltalk, the caret is the method return statement.In C++/CLI, .NET reference types are accessed through a handle using the ClassName^ syntax.In Apple's C extensions for Mac OS X and iOS, carets are used to create blocks and to denote block types.Go uses it as a bitwise NOT operator.

[ "Operating system", "Programming language", "Lung cancer", "Retinol" ]
Parent Topic
Child Topic
    No Parent Topic