Product Code Database
Example Keywords: stockings -uncharted $90-147
   » » Wiki: Caret
Tag Wiki 'Caret'.

The caret is an inverted V-shaped . It is the spacing character ^ in (at 5E) and other that may also be called a hat, control, uparrow, or less frequently chevron, sign, 'to the ' (exponent), pointer (in Pascal), or wedge. Officially, this character is referred to as accent in both ASCII and terminology (because of its historical use in ), whereas caret refers to a similar but lowered Unicode character: . Additionally, there is a lowered variant with a stroke: .

The caret and circumflex are not to be confused with other chevron-shaped characters, such as or , which may occasionally be called carets too.


Proofreading mark
The caret was originally used, and continues to be, in handwritten form as a mark to indicate where a punctuation mark, word, or phrase should be inserted in a document. The term comes from the 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 , or above the line as an inverted caret (cf. ) for a higher character such as an ; the material to be inserted may be placed inside the caret, in the margin, or above the line.

Circumflex accent
A raised variant of the symbol can be found on some , where it is used to denote a in some languages, such as French and Portuguese. It is typically a , 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 , 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 as well, and two years later, the second revision of ASCII followed suit. As the early mainframes and largely used 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.

Other uses

Programming languages
The caret has many uses in programming languages. It can signify exponentiation, the bitwise operator, string concatenation, and control characters in , among other uses. In regular expressions, the caret is used to mark the beginning of a string, or the beginning of a line within that string (depending on the regular expression and specified options); if it begins a character class, it indicates that the inverse of the class is to be matched. Pascal uses the caret for declaring pointers and when dereferencing them. Go also uses it as a operator.

In , the caret takes the function of the return statement. In a method, ^ 1 would cause the method to exit and return the number 1.

In C++/CLI the only type of pointer is C++ pointer, and the .NET reference types are accessed through a "handle", with the new syntax ClassName^ instead of ClassName*. This new construct is especially helpful when managed and standard C++ code is mixed; it clarifies which objects are under .NET automatic garbage collection and which objects the programmer must remember to explicitly destroy. In development for Apple's Mac OS X and iOS, carets are used to create blocks, and to denote block types.

Since the character was originally not available in all character sets and keyboard layouts, can transcribe it in form of the ??' which, even inside , is equivalent to the ^ character. 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 '>, if not available. RFC 1345

Surrogate symbol for superscript and exponentiation
In , the caret can signify (3^5 for ), where the usual superscript is not readily usable (as on some graphing calculators). The caret is also now used to indicate a superscript in typesetting. As described it in his 1974 " Skewered!" essay (on Skewes' number), "I make the exponent a figure of normal size and it is as though it is being held up by a lever, and its added weight when its size grows bends the lever down." The use of the caret for exponentiation can be traced back to ALGOL 60, which expressed the exponentiation operator as an upward-pointing arrow, intended to evoke the superscript notation common in mathematics. The upward-pointing arrow is now used as a form of in Knuth's up-arrow notation.

Escape character
The command-line interpreter, cmd.exe, of Windows family of operating systems uses the caret (^) to reserved characters.

C:\>ECHO Show greater than: ^> pipe: ^| less than: ^< caret: ^^ and  ^%TMP^% and ^&
Show greater than: > pipe: | less than: < caret: ^ and  %TMP% and &

Ordinal indicator
In Italian, the caret is sometimes used in a similar manner to the ordinal indicator, most noticeably on tickets from , the primary operator of trains within Italy, and ATAC public transit system. On Trenitalia tickets, the is often written as 1^ or 2^, meaning first class or second class respectively. This is due to the lack of the feminine ordinal indicator (−a) used in Italian in the ASCII set (the masculine ordinal indicator is usually replaced by the when extended characters are not available or in less accurate typesetting).

Signature tag
In social network services such as , a caret placed before a word is used to tag that word as an individual's signature within a group account thus differentiating an individual's contribution from a group-authored contribution. The caret is also a trademarked symbol for denoting a Single Point of Contact or SPOC.

Upwards-pointing arrow
In , social networking sites such as Facebook, or in , a caret or a series of carets may be used beneath or after the post of one user by another user. In this usage, the caret ^ represents an upwards-pointing arrow meaning for readers, or the (OP) to see the above line/post, and in addition to the arrow usage, can also mean that the user who posted the ^ agrees with the above post. Multiple carets may indicate the comment is replying to or relating to the post above that correlates with the number of carets used, or may simply be used for emphasis.

A similar use has been adopted by programming language such as Java compiler to point out where a compilation error has occurred. In addition to indicating the line number and column number of the error location, the compiler prints out the faulty line of code and uses a single caret on the next line, padded by spaces, to give a visual indication of the error location. The caret acts as an upwards-pointing arrow in the text-based print out of the error details.

In statistics or other forms of estimation, of a parameter or dependent variable can be shown by use of a caret or hat symbol above the symbol for that parameter or dependent variable. For example, with observations of independent variable data x_i and dependent variable data y_i, and assuming a model of y_i = \beta_0+\beta_1 x_i+\varepsilon_i, simple linear regression can lead to an estimated model of the form \hat{y}_i = \hat{\beta}_0+\hat{\beta}_1 x_i where \sum_i (y_i-\hat{y}_i)^2 is minimised by finding optimal values of \hat{\beta}_0 and \hat{\beta}_1 for the observed data.

Page 1 of 1


Pages:  ..   .. 
Items:  .. 


General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 


Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs
2s Time