Caret notation

Caret notation is a notation for control characters in ASCII. The notation assigns ^A to control-code 1, sequentially through the alphabet to ^Z assigned to control-code 26 (0x1A). For the control-codes outside of the range 1–26, the notation extends to the adjacent, non-alphabetic ASCII characters.

Often a control character can be typed on a keyboard by holding down the Ctrl and typing the character shown after the caret. The notation is often used to describe keyboard shortcuts even though the control character is not actually used (as in "type ^X to cut the text").

The meaning or interpretation of, or response to the individual control-codes is not prescribed by the caret notation.

Description

The notation consists of a caret (^) followed by a single character (usually a capital letter). The character has the ASCII code equal to the control code with the bit representing 0x40 reversed. A useful mnemonic, this has the effect of rendering the control codes 1 through 26 as ^A through ^Z. Seven ASCII control characters map outside the upper-case alphabet: 0 (NUL) is ^@, 27 (ESC) is ^[, 28 is ^\, 29 is ^], 30 is ^^, 31 is ^_, and 127 (DEL) is ^?.

Examples are "^M^J" for the Windows CR, LF newline pair, and describing the ANSI escape sequence to clear the screen as "^[[3J".

Only the use of characters in the range of 63–95 ("?@ABC...XYZ[\]^_") is specifically allowed in the notation, but use of lower-case alphabetic characters entered at the keyboard is nearly always allowed – they are treated as equivalent to upper-case letters. When converting to a control character, except for '?', masking with 0x1F will produce the same result and also turn lower-case into the same control character as upper-case.

There is no corresponding version of the caret notation for control-codes with more than 7 bits such as the C1 control characters from 128–159 (0x80–0x9F). Some programs that produce caret notation show these as backslash and octal ("\200" through "\237"). Also see the bar notation used by Acorn Computers, below.

History

The convention dates back to at least the PDP-6 (1964). A manual for the PDP-6 describes Control+C as printing C, i.e., a small superscript upwards arrow before the C.[1] In the change from 1961 ASCII to 1968 ASCII, the up arrow became a caret.[2]

Use in software

Many computer systems allow the user to enter a control character by holding down Ctrl and pressing the letter used in the caret notation. This is practical, because many control characters (e.g., EOT) cannot be entered directly from a keyboard. Although there are many ways to represent control characters, this correspondence between notation and typing makes the caret notation suitable for many applications.

Usually, the need to hold down ⇧ Shift is avoided, for instance lower-case letters work just like upper-case ones. On a US keyboard layout ctrl+/ produces DEL and ctrl+2 produces ^@. It is also common for ctrl+space to produce ^@.

Caret notation is used to describe control characters in output by many programs, particularly Unix terminal drivers and text file viewers such as more and less commands. Although the use of control-codes is somewhat standard, some uses differ from operating system to operating system, or even from program to program. The actual meaning or interpretation of the individual control-codes is not prescribed by the caret notation, and although the ASCII specification does give names to the control-codes, it does not prescribe how software should respond to them.

Alternate notations

The GSTrans string processing API on the operating systems for the Acorn Atom and the BBC Micro, and on RISC OS for the Acorn Archimedes and later machines, use the vertical bar character | in place of the caret. For example, |M (pronounced "control em", the same as for the ^M notation) is the carriage return character, ASCII 13. || is the vertical bar character code 124, |? is character 127 as above and |! adds 128 to the code of the character that follows it, so |!|? is character code 128 + 127 = 255.

See also

References

  1. ^ "PDP-6 Timesharing Software" (PDF). Digital Equipment Corporation. p. 4.
  2. ^ Haynes, Jim (2015-01-13). "First-Hand: Chad is Our Most Important Product: An Engineer's Memory of Teletype Corporation". Engineering and Technology History Wiki (ETHW). Archived from the original on October 31, 2016. Retrieved 2016-10-31. There was the change from 1961 ASCII to 1968 ASCII. Some computer languages used characters in 1961 ASCII such as up arrow and left arrow. These characters disappeared from 1968 ASCII. We worked with Fred Mocking, who by now was in Sales at Teletype, on a type cylinder that would compromise the changing characters so that the meanings of 1961 ASCII were not totally lost. The underscore character was made rather wedge-shaped so it could also serve as a left arrow.


Read other articles:

Pyrrosia Pyrrosia piloselloides Klasifikasi ilmiah Kerajaan: Plantae Divisi: Pteridophyta Kelas: Pteridopsida Ordo: Polypodiales Famili: Polypodiaceae Genus: Pyrrosia Pyrrosia adalah genus paku-pakuan epifit merambat anggota famili Polypodiaceae. Ada sekitar 100 jenis (spesies) yang termasuk ke dalam marga ini, termasuk yang sebelumnya dimasukkan dalam Drymoglossum.[1] Anggota-anggotanya kerap tumbuh rapat menutupi batang pohon sehingga dapat menjadi gulma karena menghambat pertumbuha...

Туре Эрьясетернорв. Tore Ørjasæter Дата рождения 3 марта 1886(1886-03-03)[1][2] Место рождения Шок, Оппланн, Норвегия Дата смерти 29 февраля 1968(1968-02-29)[1][3][…] (81 год) Место смерти Шок, Оппланн, Норвегия Гражданство (подданство)  Норвегия Род деятельности писатель, поэт Я...

دانيار إسماعيلوف Daniyar Ismayilov معلومات شخصية الميلاد 3 فبراير 1992 (العمر 31 سنة)ليباب، تركمانستان الطول 1.73 متر  الجنسية تركمانستان  الوزن 68 كـغ (150 رطل) الحياة العملية المهنة رباع  الرياضة رفع الأثقال  بلد الرياضة تركمانستان تركيا  سجل الميداليات منافس من  تركي

Disambiguazione – Gorbačëv rimanda qui. Se stai cercando altri significati, vedi Gorbačëv (disambigua). Michail GorbačëvМихаил ГорбачёвMikhail Gorbaciov nel 1987 Segretario generale del Partito Comunista dell'Unione SovieticaDurata mandato11 marzo 1985 –24 agosto 1991 PredecessoreKonstantin Chernenko SuccessoreVladimir Ivashko Presidente dell'URSSDurata mandato15 marzo 1990 –26 decembre 1991 Vice presidenteGennadij Janaev Capo...

Japanese baseball player Baseball player Norihiro KomadaYomiuri Giants – No. 70First baseman / CoachBorn: (1962-09-14) September 14, 1962 (age 61)Shiki District, Nara, JapanBatted: LeftThrew: LeftNPB debutApril 10, 1983, for the Yomiuri GiantsLast NPB appearanceOctober 10, 2000, for the Yokohama BayStarsNPB statistics (through 2000)Batting average.289Home runs195Hits2006 TeamsAs player Yomiuri Giants (1981–1993) Yokohama BayStars (1994–2000) As...

2011 aviation accident Angara Airlines Flight 9007RA-47302, the aircraft involved, seen in February 2011 at Tolmachevo AirportAccidentDate11 July 2011 (2011-07-11)SummaryDitching following engine fireSite15 km SW of Strezhevoy, Tomsk Oblast, Russia 60°37.237′N 77°22.735′E / 60.620617°N 77.378917°E / 60.620617; 77.378917AircraftAircraft typeAntonov An-24RVOperatorAngara AirlinesIATA flight No.IK9007/SP5007RegistrationRA-47302Flight originBoga...

Italian poet, dramatist, and diplomat Giovanni Battista GuariniBorn10 December 1538, 1538 Ferrara, Duchy of FerraraDied7 October 1612  (aged 73)Venice, Republic of VeniceNationalityItalianOccupationPlaywright, writer, poet, diplomat WorksIl pastor fido MovementRenaissance Pastor fido, 1680 Giovanni Battista Guarini (10 December 1538 – 7 October 1612) was an Italian poet, dramatist, and diplomat. Life Guarini was born in Ferrara. On the termination of his studies at the u...

Japanese-language North American television channel This article relies largely or entirely on a single source. Relevant discussion may be found on the talk page. Please help improve this article by introducing citations to additional sources.Find sources: TV Japan – news · newspapers · books · scholar · JSTOR (December 2018) Television channel TV JapanCountryUnited StatesBroadcast areaNorthern AmericaHeadquartersNew York CityProgrammingLanguage(s)Japa...

The desk for the president of the Maine Senate in 2014 The position of President of the Maine Senate was created when Maine separated from Massachusetts and achieved statehood in 1820. The Maine Legislature had one year terms until 1880, when an amendment to the Maine Constitution took effect to provide for two year terms. Joseph A. Locke was the first Senate president to serve a two-year term, starting in 1881.[1] As Maine has no lieutenant governor, the president of the Senate is fi...

State park in Santa Cruz County, California, United States Big Basin redirects here. For the Kansas nature preserve, see Big Basin Prairie Preserve. Big Basin Redwoods State ParkIUCN category V (protected landscape/seascape)Lush coast redwood forest of Big BasinShow map of CaliforniaShow map of the United StatesLocationSanta Cruz County, California, United StatesNearest citySanta Cruz, CaliforniaCoordinates37°10′21″N 122°13′21″W / 37.17250°N 122.22250°W...

American college football season 1924 Chicago Maroons footballBig Ten championConferenceBig Ten ConferenceRecord4–1–3 (3–0–3 Big Ten)Head coachAmos Alonzo Stagg (33rd season)Home stadiumStagg FieldUniformSeasons← 19231925 → 1924 Big Ten Conference football standings vte Conf Overall Team W   L   T W   L   T No. 11 Chicago $ 3 – 0 – 3 4 – 1 – 3 No. 4 Illinois 3 – 1 – 1 6 – 1 – 1 No. 6 Io...

1921 film The BetrayerOriginal newspaper advertisementDirected byBeaumont SmithWritten byBeaumont SmithProduced byBeaumont SmithStarringStella SouthernCinematographyLacey PercivalProductioncompanyBeaumont Smith ProductionsDistributed byBeaumont SmithRelease date19 March 1921[1]Running time5,500 feetCountriesAustraliaNew ZealandLanguageEnglish The Betrayer is a 1921 Australian-New Zealand lost film from director Beaumont Smith about an interracial romance between a white Australian man...

Politics of New Zealand Constitution The Crown Monarchy of New Zealand Sovereign King Charles III Governor-General (list) Cindy Kiro Realm of New Zealand Executive government List of governments (current) Cabinet Ministers Prime Minister (list) Christopher Luxon Executive Council State services departments Legislature54th New Zealand Parliament King-in-Parliament House of Representatives Speaker: Gerry Brownlee Official Opposition Elections Political parties Electorates Electoral system ...

This article is about the R. Kelly album. For the Charlie and the Chocolate Factory franchise, see Charlie and the Chocolate Factory (disambiguation). For manufacturing of chocolate, see chocolate. For bean-to-bar makers, see List of bean-to-bar chocolate manufacturers. 2003 studio album by R. KellyChocolate FactoryStudio album by R. KellyReleasedFebruary 18, 2003[1]StudioRockland (Chicago)CRC (Chicago)GenreR&Bsoulneo soul[2]Length76:26LabelJiveProducerR. KellyR. K...

American-Japanese television presenter This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages) This biography of a living person needs additional citations for verification. Please help by adding reliable sources. Contentious material about living persons that is unsourced or poorly sourced must be removed immediately from the article and its talk page, especially if potentially libelous.Find sou...

Reservoir in Pennsylvania and New YorkAllegheny ReservoirState Route 59 crossing the reservoir in Warren County, PennsylvaniaAllegheny ReservoirShow map of PennsylvaniaAllegheny ReservoirShow map of the United StatesLocationPennsylvania and New YorkCoordinates41°50′16″N 79°00′14″W / 41.83778°N 79.00389°W / 41.83778; -79.00389TypeReservoirBasin countriesUnited StatesMax. length24 mi (39 km)Surface area12,000 acres (49 km2) The Allegheny R...

18th episode of the 6th season of King of the Hill My Own Private RodeoKing of the Hill episodeDale and his father Bug tearfully reconcile after a 20 year estrangement.Episode no.Season 6Episode 18Directed byCyndi Tang-LovelandWritten byAlex Gregory & Peter HuyckProduction code6ABE16Original air dateApril 28, 2002 (2002-04-28)Guest appearanceDavid Herman as Bug GribbleEpisode chronology ← PreviousFun with Jane and Jane Next →Sug Night King of the Hill (se...

Der Walk of Fame auf dem Museumsvorplatz Die Hall of Fame des deutschen Fußballs ist die 2018 gegründete Ruhmeshalle des deutschen Fußballs. Sie wurde vom Deutschen Fußballmuseum initiiert, angeregt von Manuel Neukirchner, dem Direktor des Deutschen Fußballmuseums. Inhaltsverzeichnis 1 Wahl der Gründungself 2 Jurymitglieder 3 Liste der aufgenommenen Spieler 4 Liste der aufgenommenen Spielerinnen 5 Liste der aufgenommenen Trainer 6 Liste der aufgenommenen Trainerinnen 7 Weblinks 8 Einzel...

Railway station in Essex, England WestcliffGeneral informationLocationWestcliff-on-Sea, Southend-on-SeaEnglandGrid referenceTQ867854Managed byc2cPlatforms2Other informationStation codeWCFClassificationDfT category F1HistoryOriginal companyLondon, Tilbury and Southend RailwayPre-groupingMidland RailwayPost-groupingLondon, Midland and Scottish RailwayKey dates1 July 1895 (1895-07-01)Opened as Westcliff-on-Sea20 February 1969Renamed WestcliffPassengers2017/18 1.299 million2018/19 ...

Halaman ini berisi artikel tentang klub sepak bola wanita. Untuk klub sepak bola pria, lihat A.C. Milan. Artikel ini bukan mengenai A.C.F. Milan. AC MilanNama lengkapAssociazione Calcio Milan S.p.A.[1]JulukanRossonere (Merah dan hitam)Nama singkatA.C Milan Women, Milan FemminileBerdiri11 Juni 2018; 5 tahun lalu (2018-06-11)StadionCentro Sportivo Vismara[2]LigaSerie A2021–2022Serie A, 3 dari 12Situs webSitus web resmi klub Kostum kandang Kostum tandang Kostum ketiga...