Tilde
~◌̃ | |
---|---|
Tilde (symbol), Combining tilde (diacritic) | |
InUnicode | U+007E~TILDE U+0303◌̃COMBINING TILDE |
Related | |
See also | Double tilde (disambiguation) U+301C〜WAVE DASH |
Thetilde(/ˈtɪldə/,also/ˈtɪld,-di,-deɪ/)[1]is agrapheme⟨˜⟩or⟨~⟩with a number of uses. The name of the character came intoEnglishfromSpanishtilde,which in turn came from theLatintitulus,meaning 'title' or 'superscription'.[2]Its primary use is as adiacritic(accent) in combination with a base letter. Its freestanding form is used in modern texts mainly to indicateapproximation.
History
[edit]Use by medieval scribes
[edit]The tilde was originally one of a variety of marks written over an omitted letter or several letters as ascribal abbreviation(a "mark of contraction" ).[3]Thus, the commonly used wordsAnno Dominiwere frequently abbreviated toAoDñi,with an elevated terminal with a contraction mark placed over the "n". Such a mark could denote the omission of one letter or several letters. This saved on the expense of the scribe's labor and the cost of vellum and ink. Medieval European charters written in Latin are largely made up of such abbreviated words with contraction marks and other abbreviations; only uncommon words were given in full.
The text of theDomesday Bookof 1086, relating for example, to themanor of MollandinDevon(see adjacent picture), is highlyabbreviatedas indicated by numerous tildes.
The text with abbreviations expanded is as follows:
Mollande tempore regis Eduardi geldabat pro quattuor hidis et uno ferling. Terra est quadraginta carucae. In dominio sunt tres carucae et decem servi et triginta villani et viginti bordarii cum sedecim carucis. Ibi duodecim acrae prati et quindecim acrae silvae. Pastura tres leugae in longitudine et latitudine. Reddit quattuor et viginti libras ad pensam. Huic manerio est adjuncta Blachepole. Elwardus tenebat tempore regis Edwardi pro manerio et geldabat pro dimidia hida. Terra est duae carucae. Ibi sunt quinque villani cum uno servo. Valet viginti solidos ad pensam et arsuram. Eidem manerio est injuste adjuncta Nimete et valet quindecim solidos. Ipsi manerio pertinet tercius denarius de Hundredis Nortmoltone et Badentone et Brantone et tercium animal pasturae morarum.
Role of mechanical typewriters
[edit]Ontypewritersdesigned for languages that routinely usediacritics(accent marks), there are two possible solutions. Keys can be dedicated toprecomposed charactersor alternatively adead keymechanism can be provided. With the latter, a mark is made when a dead key is typed, but unlike normal keys, the paper carriage does not move on and thus the next letter to be typed is printed under that accent. Typewriters forSpanishtypically have a dedicated key forÑ/ñ but, asPortugueseusesÃ/ã andÕ/õ, a single dead-key (rather than take two keys to dedicate) is the most practical solution.
The tilde symbol did not exist independently as amovable typeorhot-leadprinting character since thetype casesfor Spanish or Portuguese would includesortsfor the accented forms.
The centralized ASCII tilde
[edit]Serif: | —~— |
Sans-serif: | —~— |
Monospace: | —~— |
A free-standing tilde between two em dashes in three font families |
The firstASCIIstandard (X3.64-1963) did not have a tilde.[4]: 246 Like Portuguese and Spanish, the French, German and Scandinavian languages also needed symbols in excess of the basic 26 needed for English. TheASAworked with and through theCCITTto internationalize the code-set, to meet the basic needs of at least the Western European languages.
It appears to have been at their May 13–15, 1963 meeting that the CCITT decided that the proposed ISO 7-bit code standard would be suitable for their needs if a lower case Alpha bet and five diacritical marks [...] were added to it.[5]At the October 29–31 meeting, then, the ISO subcommittee altered the ISO draft to meet the CCITT requirements, replacing the up-arrow and left-arrow with diacriticals, adding diacritical meanings to the apostrophe and quotation mark, and making thenumber signa dual[a]for the tilde.[6]
— Yucca's free information site (which cites the original sources).[7]
Thus ISO646 was born (and the ASCII standard updated to X3.64-1967), providing the tilde and other symbols as optional characters.[4]: 247 [b]
ISO646 and ASCII incorporated many of the overprinting lower-case diacritics from typewriters, including tilde. Overprinting was intended to work by putting abackspacecode between the codes for letter and diacritic.[8]However even at that time, mechanisms that could do this or any other overprinting were not widely available, did not work for capital letters, and were impossible on video displays, with the result that this concept failed to gain significant acceptance. Consequently, many of these free-standing diacritics (and theunderscore) were quickly reused by software as additional syntax, basically becoming new types of syntactic symbols that a programming language could use. As this usage became predominant,type designgradually evolved so these diacritic characters became larger and more vertically centered, making them useless as overprinted diacritics but much easier to read as free-standing characters that had come to be used for entirely different and novel purposes. Most modern fonts align the plain ASCII "spacing"(free-standing) tilde at the same level asdashes,or only slightly higher.[citation needed]
The free-standing tilde is at code 126 in ASCII, where it was inherited into Unicode as U+007E.
A similar shaped mark (⁓) is known in typography andlexicographyas aswung dash:these are used in dictionaries to indicate the omission of the entry word.[9]
Connection to Spanish
[edit]As indicated by the etymological origin of the word "tilde" in English, this symbol has been closely associated with theSpanish language.The connection stems from the use of the tilde above the letter⟨n⟩to form the (different) letter⟨ñ⟩in Spanish, a feature shared by onlya few other languages,most of which are historically connected to Spanish. This peculiarity can help non-native speakers quickly identify a text as being written in Spanish with little chance of error. Particularly during the 1990s, Spanish-speaking intellectuals and news outlets demonstrated support for the language and the culture by defending this letter againstglobalisationandcomputerisationtrends that threatened to remove it from keyboards and other standardised products and codes.[10][11]TheInstituto Cervantes,founded bySpain's governmentto promote the Spanish language internationally, chose as its logo a highly stylisedÑwith a large tilde. The 24-hour news channelCNNin the US later adopted a similar strategy on its existing logo for the launch of itsSpanish-language version,therefore being written as CN͠N. And similarly to theNational Basketball Association( NBA ), theSpain men's national basketball teamis nicknamed "ÑBA".
In Spanish itself the wordtildeis used more generally for diacritics, including the stress-marking acute accent.[12]The diacritic~is more commonly calledvirgulillaorla tilde de la eñe,and is not considered an accent mark in Spanish, but rather simply a part of the letterñ(much likethe dotoverımakes anicharacter that is familiar to readers of English).
Usage
[edit]Letters with tilde
[edit]Unicode encodes a number of cases of "letter with tilde" asprecomposed charactersand these are displayed below. In addition, many more symbols may be composed using thecombining characterfacility (U+0303◌̃COMBINING TILDE,U+0330◌̰COMBINING TILDE BELOWand others) that may be used with any letter or other diacritic to create a customised symbol but this does not mean that the result has any real-world application and are not shown in the table.
A tilde diacritic can be added to almost any character by using acombiningtilde. Greek and Cyrillic letters with tilde (Α͂ ᾶ,Η͂ ῆ,Ι͂ ῖ,ῗ,Υ͂ ῦ,ῧ andА̃ а̃,Ә̃ ә̃,Е̃ е̃,И̃ и̃,О̃ о̃,У̃ у̃,Ј̃ j̃) are formed using this method.
Common use in English
[edit]TheEnglish languagedoes not use the tilde as a diacritic, though it is used in someloanwords.The standalone form of the symbol is used more widely. Informally,[13]it means"approximately","about", or "around", such as "~30 minutes before", meaning "approximately30 minutes before ".[14][15]It may also mean "similar to",[16]including "of the sameorder of magnitudeas ",[13]such as "x~y"meaning thatxandyare of the same order of magnitude. Another approximation symbol is thedouble tilde≈,meaning "approximately/almost equal to".[14][16][17]The tilde is also used to indicatecongruenceof shapes by placing it over an=symbol, thus≅.
In more recent digital usage, tildes on either side of a word or phrase have sometimes come to convey a particular tone that "let[s] the enclosed words perform both sincerity and irony", which can pre-emptively defuse a negative reaction.[18]For example,BuzzFeedjournalist Joseph Bernstein interprets the tildes in the followingtweet:
- "in the ~ spirit of the season ~ will now link to some of the (imho) #Bestof2014 sports reads. if you hate nice things, mute that hashtag."
as a way of making it clear that both the author and reader are aware that the enclosed phrase – "spirit of the season" – "is cliche and we know this quality is beneath our author, and we don't want you to think our author is a cliche person generally".[18][c]
Among other uses, the symbol has been used onsocial mediatoindicate sarcasm.[19]It may also be used online, especially in informal writing such asfanfiction,to convey a cutesy, playful, or flirtatious tone.[20]
Diacritical use
[edit]In some languages, the tilde is adiacriticmark placed over aletterto indicate a change in its pronunciation:
Pitch
[edit]The tilde was firstly used in thepolytonic orthographyofAncient Greek,as a variant of thecircumflex,representing a rise inpitchfollowed by a return to standard pitch.[citation needed]
Abbreviation
[edit]Later, it was used to makeabbreviationsin medievalLatindocuments. When an⟨n⟩or⟨m⟩followed a vowel, it was often omitted, and a tilde (physically, a small⟨N⟩) was placed over the preceding vowel to indicate the missing letter; this is the origin of the use of tilde to indicate nasalization (comparethe development of the umlautas an abbreviation of⟨e⟩.) The practice of using the tilde over a vowel to indicate omission of an⟨n⟩or⟨m⟩continued in printed books inFrenchas a means of reducing text length until the 17th century. It was also used inPortugueseandSpanish.[citation needed]
The tilde was also used occasionally to make other abbreviations, such as over the letter⟨q⟩,makingq̃,to signify the wordque( "that" ).[citation needed]
Nasalization
[edit]It is also as a small⟨n⟩that the tilde originated when written above other letters, marking aLatin⟨n⟩which had beenelidedin old Galician-Portuguese. In modernPortugueseit indicatesnasalizationof the base vowel:mão"hand", from Lat.manu-;razões"reasons", from Lat.rationes.[citation needed]This usage has been adopted in the orthographies of severalnative languages of South America,such asGuaraniandNheengatu,as well as in theInternational Phonetic Alphabet(IPA) and many other phonetic Alpha bets. For example,[ljɔ̃]is the IPA transcription of the pronunciation of the French place-nameLyon.
InBreton,the symbol⟨ñ⟩after a vowel means that the letter⟨n⟩serves only to give the vowel a nasalised pronunciation, without being itself pronounced, as it normally is. For example,⟨an⟩gives the pronunciation[ãn]whereas⟨añ⟩gives[ã].
In theDMGromanization ofTunisian Arabic,the tilde is used for nasal vowels õ and ṏ.
Palatal n
[edit]The tilded⟨n⟩(⟨ñ⟩,⟨Ñ⟩) developed from the digraph⟨nn⟩in Spanish. In this language,⟨ñ⟩is considered a separate letter calledeñe(IPA:[ˈeɲe]), rather than a letter-diacritic combination; it is placed in Spanish dictionaries between the letters⟨n⟩and⟨o⟩.In Spanish, the wordtildeactually refers to diacritics in general, e.g. the acute accent inJosé,[21]while the diacritic in⟨ñ⟩is called "virgulilla" (IPA:[birɣuˈliʝa]) (yeísta) or (IPA:[birɣuˈliʎa]) (non-yeísta).[22]Current languages in which the tilded⟨n⟩(⟨ñ⟩) is used for thepalatal nasalconsonant/ɲ/include
Tone
[edit]InVietnamese,a tilde over a vowel represents a creaky risingtone(ngã). Letters with the tilde are not considered separate letters of theVietnamese Alpha bet.
International Phonetic Alphabet
[edit]Inphonetics,a tilde is used as adiacritic that is placedabove a letter, below it orsuperimposedonto the middle of it:
- A tilde above a letter indicatesnasalization,e.g.[ã],[ṽ].
- A tilde superimposed onto the middle of a letter indicatesvelarizationorpharyngealization,e.g.[ɫ],[z̴].If no precomposedUnicodecharacter exists, the Unicode characterU+0334◌̴COMBINING TILDE OVERLAYcan be used to generate one.
- A tilde below a letter indicateslaryngealisation,e.g.[d̰].If no precomposed Unicode character exists, the Unicode characterU+0330◌̰COMBINING TILDE BELOWcan be used to generate one.
A tilde between twophonemesindicates optionality, or "alternates with". E.g. ⟨ɕ ~ ʃ⟩ could indicate that the sounds may alternate depending on context (free variation), or that they vary based on region or speaker, or some other variation.
Letter extension
[edit]InEstonian,the symbol⟨õ⟩stands for theclose-mid back unrounded vowel,and it is considered an independent letter.
Modern Usage
[edit]In moderninternet slang,the tilde can be used to signify endearment or love, i.e. "Hello master~". It is commonly used in thefurryandfemboycommunities and can also be used as a diminutive, akin to adding the "ee" sound to the end of a word.[citation needed]
Other uses
[edit]Some languages and Alpha bets use the tilde for other purposes, such as:
- Arabic script:A symbol resembling the tilde (U+0653ـٓARABIC MADDAH ABOVE) is used over the letter⟨ا⟩(/a/) to become⟨آ⟩,denoting a long/ʔaː/sound.
- Guaraní:The tilded⟨G̃⟩(note that⟨G/g⟩with tilde is not available as a precomposed glyph inUnicode) stands for thevelar nasalconsonant. Also, the tilded⟨y⟩(⟨Ỹ⟩) stands for the nasalized upper central rounded vowel[ɨ̃].Munduruku,Parintintín, and two older spellings of Filipino words also use⟨g̃⟩.
- Syriac script:A tilde (~) under the letterKaphrepresents a[t͡ʃ]sound, transliterated aschorč.[23]
- EstonianandVõrouse the tilde above the letter o (õ) to indicate the vowel[ɤ],a rare sound among languages.
- Unicodehas acombiningvertical tilde character:U+033E◌̾COMBINING VERTICAL TILDE.It is used to indicatemiddle tonein linguistic transcription of certain dialects of theLithuanian language,[24]and was also used historically in the letterх̾,which was part of thePolish Cyrillic Alpha betof the late 19th century.
- Resurrección María de Azkue's 1906 Basque dictionary used an idiosyncratic spelling including⟨ãd̃ẽĩl̃ñõs̃t̃ũx̃⟩.[25]
Punctuation
[edit]The tilde is used in various ways in punctuation, including:
Range
[edit]In some languages (such as in French),[citation needed]a tilde or a tilde-likewave dash(Unicode:U+301C〜WAVE DASH) may be used as apunctuationmark (instead of an unspacedhyphen,en dashorem dash) between twonumbers,to indicate arange.Doing so avoids the risk of confusion withsubtractionor a hyphenated number (such as a part number or model number). For example, "12~15" means "12 to 15", "~3" means "up to three", and "100~" means "100 and greater".[citation needed]East Asian languagesalmost always use this convention, but it is sometimes done for clarity in some other languages as well.Chineseuses the wave dash andfull-widthem dash interchangeably for this purpose. In English, the tilde is often used to express ranges and model numbers inelectronics,but rarely in formal grammar or in type-set documents, as a wavy dash preceding a number sometimes represents an approximation (see below).
Therange tildeis used for various purposes inFrench,but only to denote ranges of numbers (e.g.,« 21~32 degrés Celsius »"means" 21 to 32 degrees Celsius ")[citation needed]
(The symbolU+2248≈ALMOST EQUAL TO(adouble tilde) is also used in French, for example,« ≈400 mètres »means "approximately 400 meters"[citation needed].)
Approximation
[edit]Before a number the tilde can mean 'approximately'; '~42' means 'approximately 42'.[26]When used withcurrency symbolsthat precede the number (national conventions differ), the tilde precedes the symbol, thus for example '~$10' means 'about ten dollars'.[27][better source needed]
The symbols≈(almost equal to) and≅(approximately equal to) are among the othersymbols used to express approximation.
Japanese
[edit]Thewave dash(Sóng ダッシュ,nami dasshu)is used for various purposes in Japanese, including to denote ranges of numbers (e.g.,5〜10means between 5 and 10) in place of dashes or brackets, and to indicate origin. The wave dash is also used to separate a title and a subtitle in the same line, as acolonis used in English.
When used in conversations via email or instant messenger it may be used as asarcasm mark[citation needed].
The sign is used as a replacement for thechōon,katakana character, in Japanese, extending the final syllable.
Unicode and Shift JIS encoding of wave dash
[edit]In practice the full-width tilde(Toàn giác チルダ,zenkaku chiruda)(UnicodeU+FF5E~FULLWIDTH TILDE), is often used instead of the wave dash(Sóng ダッシュ,nami dasshu)(UnicodeU+301C〜WAVE DASH), because theShift JIScode for the wave dash, 0x8160, which should be mapped to U+301C,[28][29]is instead mapped to U+FF5E[30]inWindows code page 932(Microsoft'scode pagefor Japanese), a widely used extension of Shift JIS.
This decision avoided a shape definition error in the original (6.2) Unicode code charts:[31]the wave dash reference glyph in JIS / Shift JIS[32][33]matches the Unicode reference glyph for U+FF5EFULLWIDTH TILDE,[34]while the original reference glyph for U+301C[31]was reflected, incorrectly,[35]when Unicode imported the JIS wave dash. In other platforms such as theclassic Mac OSandmacOS,0x8160 is correctly mapped to U+301C. It is generally difficult, if not impossible, for users of Japanese Windows to type U+301C, especially in legacy, non-Unicode applications.
A similar situation exists regarding the KoreanKS X 1001character set, in which Microsoft maps theEUC-KRorUHCcode for the wave dash (0xA1AD) toU+223C∼TILDE OPERATOR,[36][37]whileIBMandApplemap it to U+301C.[38][39][40]Microsoft also uses U+FF5E to map the KS X 1001 raised tilde (0xA2A6),[37]while Apple usesU+02DC˜SMALL TILDE.[40]
The current Unicode reference glyph for U+301C has been corrected[35]to match the JIS standard[41]in response to a 2014 proposal, which noted that while the existing Unicode reference glyph had been matched by fonts from the discontinuedWindows XP,all other major platforms including later versions of Microsoft Windows shipped with fonts matching the JIS reference glyph for U+301C.[42]
The JIS / Shift JIS wave dash is still formally mapped to U+301C as ofJIS X 0213,[43]whereas theWHATWGEncoding Standard used byHTML5follows Microsoft in mapping 0x8160 to U+FF5E.[44]These two code points have a similar or identical glyph in several fonts, reducing the confusion and incompatibility.
Mathematics
[edit]As a unary operator
[edit]A tilde in front of a single quantity can mean "approximately", "about"[14]or "of the sameorder of magnitudeas. "
In writtenmathematical logic,the tilde representsnegation:"~p"means" notp",where"p"is aproposition.Modern use often replaces the tilde with the negation symbol (¬) for this purpose, to avoid confusion withequivalence relations.
As a relational operator
[edit]Inmathematics,the tilde operator (which can be represented by a tilde or the dedicated characterU+223C∼TILDE OPERATOR), sometimes called "twiddle", is often used to denote anequivalence relationbetween two objects. Thus "x~y"means"xisequivalenttoy".It is a weaker statement than stating thatxequalsy.The expression "x~y"is sometimes read aloud as"xtwiddlesy",perhaps as an analogue to the verbal expression of"x=y".[45]
The tilde can indicate approximate equality in a variety of ways. It can be used to denote theasymptotic equalityof two functions. For example,f (x) ~g(x)means that.[13]
A tilde is also used to indicate "approximatelyequal to "(e.g. 1.902 ~= 2). This usage probably developed as a typed alternative to thelibra symbolused for the same purpose in written mathematics, which is an equal sign with the upper bar replaced by a bar with an upward hump, bump, or loop in the middle (︍︍♎︎) or, sometimes, a tilde (≃).[citation needed]The symbol "≈" is also used for this purpose.
Inphysicsandastronomy,a tilde can be used between two expressions (e.g.h~ 10−34J s) to state that the two are of the sameorder of magnitude.[13]
Instatisticsandprobability theory,the tilde means "is distributed as";[13]seerandom variable(e.g. X ~ B(n,p) for a binomial distribution).
A tilde can also be used to represent geometricsimilarity(e.g.∆ABC~ ∆DEF,meaningtriangleABCis similar toDEF). A triple tilde (≋) is often used to showcongruence,an equivalence relation in geometry.[citation needed]
Ingraph theory,the tilde can be used to represent adjacency between vertices. The edgeconnects verticesandwhich can be said to be adjacent, and this adjacency can be denoted.
As a diacritic
[edit]The symbol ""is pronounced as" eff tilde "or, informally, as" eff twiddle ".[46][47]This can be used to denote theFourier transformoff,or aliftoff,and can have a variety of other meanings depending on the context.
A tilde placed below a letter in mathematics can represent avectorquantity (e.g.).
Instatisticsandprobability theory,a tilde placed on top of a variable is sometimes used to represent themedianof that variable; thuswould indicate the median of the variable.A tilde over the letter n () is sometimes used to indicate theharmonic mean.
In machine learning, a tilde may represent a candidate value for a cell state inGRUsorLSTMunits. (e.g. c̃)
Physics
[edit]Often inphysics,one can consider anequilibrium solutionto an equation, and then a perturbation to that equilibrium. For the variables in the original equation (for instance) a substitutioncan be made, whereis the equilibrium part andis the perturbed part.
A tilde is also used inparticle physicsto denote the hypotheticalsupersymmetricpartner. For example, anelectronis referred to by the lettere,and itssuperpartnertheselectronis writtenẽ.
In multibody mechanics, the tilde operator maps three-dimensional vectorsto skew-symmetrical matrices(see[48]or[49]).
Economics
[edit]For relations involving preference,economistssometimes use the tilde to representindifferencebetween two or more bundles of goods. For example, to say that a consumer is indifferent between bundlesxandy,an economist would writex~y.
Electronics
[edit]It can approximate the sine wave symbol (∿,U+223F), which is used inelectronicsto indicatealternating current,in place of +, −, or ⎓ fordirect current.
Linguistics
[edit]The tilde may indicate alternatingallomorphsormorphological alternation,as in//ˈniː~ɛl+t//forkneel~knelt(theplus sign'+' indicates a morpheme boundary).[50][51]
The tilde may represent some sort of phonetic or phonemic variation between two sounds, which might beallophonesor infree variation.For example,[χ~x]can represent "either[χ]or[x]".
Informal semantics,it is also used as a notation for thesquiggle operatorwhich plays a key role in many theories offocus.[52]
Computing
[edit]Computer programmersuse the tilde in various ways and sometimes call the symbol (as opposed to the diacritic) asquiggle,squiggly,swiggle,ortwiddle.According to theJargon File,other synonyms sometimes used in programming includenot,approx,wiggle,enyay(aftereñe) and (humorously)sqiggle/ˈskɪɡəl/.[53]
Directories and URLs
[edit]OnUnix-likeoperating systems(includingAIX,BSD,LinuxandmacOS), tilde normally indicates the current user'shome directory.For example, if the current user's home directory is/home/user,then the commandcd ~is equivalent tocd /home/user,cd $HOME,orcd.[53]This convention derives from theLear-SieglerADM-3Aterminal in common use during the 1970s, which happened to have the tilde symbol and the word "Home" (for moving the cursor to the upper left) on the same key.[citation needed]When prepended to a particular username, the tilde indicates that user's home directory (e.g.,~janedoefor the home directory of userjanedoe,such as/home/janedoe).[54]
Used inURLson theWorld Wide Web,it often denotes a personal website on aUnix-based server. For example,http:// example /~johndoe/might be the personal website of John Doe. This mimics the Unix shell usage of the tilde. However, when accessed from the web, file access is usually directed to asubdirectoryin the user's home directory, such as/home/username/public_htmlor/home/username/www.[55]
In URLs, the characters%7E(or%7e) may substitute for a tilde if an input device lacks a tilde key.[56]Thus,http:// example /~johndoe/andhttp:// example /%7Ejohndoe/will behave in the same manner.
Computer languages
[edit]This sectionneeds additional citations forverification.(October 2024) |
Regex
[edit]The tilde is used in theAWKprogramming languageas part of the pattern match operators forregular expressions:
variable~ /regex/
returns true if the variable is matched.variable!~ /regex/
returns false if the variable is matched.
A variant of this, with the plain tilde replaced with=~
,was adopted inPerl,and this semi-standardization has led to the use of these operators in other programming languages, such asRubyor theSQLvariant of the databasePostgreSQL.
InAPLandMATLAB,tilde represents the monadic logical function NOT, and in APL it additionally represents the dyadicmultisetfunctionwithout(set difference).
InCthe tilde character is used asbitwise NOTunaryoperator,following the notation in logic (an!
causes a logical NOT, instead). This is also used by most languages based on or influenced by C, such asC++,D,C#andJulia.TheMySQL databasealso use tilde as bitwise invert[57]as does Microsoft's SQL ServerTransact-SQL (T-SQL)language.JavaScriptalso uses tilde as bitwise NOT, and because JavaScript internally uses floats and the bitwise complement only works on integers, numbers are stripped of their decimal part before applying the operation. This has also given rise to using two tildes~~x
as a short syntax for a cast to integer (numbers are stripped of their decimal part and changed into their complement, and then back).
In C++ and C#, the tilde is also used as the first character in aclass'smethodname (where the rest of the name must be the same name as the class) to indicate adestructor– a special method which is called at the end of theobject's life.
In ASP.NET application tilde ('~') is used as a shortcut to the root of the application's virtual directory.
In theCSSstylesheet language, the tilde is used for the indirect adjacent combinator as part of a selector.
In theD programming language,the tilde is used as anarrayconcatenationoperator, as well as to indicate an object destructor and bitwise not operator. Tilde operator can be overloaded for user types, and binary tilde operator is mostly used to merging two objects, or adding some objects to set of objects. It was introduced because plus operator can have different meaning in many situations. For example, what to do with "120" + "14"? Is this a string "134" (addition of two numbers), or "12014" (concatenation of strings) or something else? D disallows + operator for arrays (and strings), and provides separate operator for concatenation (similarlyPHPprogramming language solved this problem by using dot operator for concatenation, and + for number addition, which will also work on strings containing numbers).
InEiffel,the tilde is used for object comparison. Ifaandbdenote objects, the Boolean expressiona~bhas value true if and only if these objects are equal, as defined by the applicable version of the library routineis_equal,which by default denotes field-by-field object equality but can be redefined in any class to support a specific notion of equality. Ifaandbare references, the object equality expressiona~bis to be contrasted witha=bwhich denotes reference equality. Unlike the calla.is_equal(b), the expressiona~bistype-safeeven in the presence ofcovariance.
In theApache Groovy programming languagethe tilde character is used as an operator mapped to the bitwiseNegate() method.[58]Given a String the method will produce a java.util.regex.Pattern. Given an integer it will negate the integer bitwise like in C.=~
and==~
can in Groovy be used to match a regular expression.[59][60]
InHaskell,the tilde is used in type constraints to indicate type equality.[61]Also, in pattern-matching, the tilde is used to indicate a lazy pattern match.[62]
In theInformprogramming language, the tilde is used to indicate a quotation mark inside a quoted string.
In "text mode" of theLaTeXtypesetting language a tilde diacritic can be obtained using, e.g.,\~{n}
,yielding "ñ". A stand-alone tilde can be obtained by using\textasciitilde
or\string~
.
In "math mode" a tilde diacritic can be written as, e.g.,\tilde{x}
.For a wider tilde\widetilde
can be used. The\sim
command produce a tilde-like binary relation symbol that is often used in mathematical expressions, and the double-tilde≈is obtained with\approx
.Theurl
package also supports entering tildes directly, e.g.,\url{http://server/~name}
.
In both text and math mode, a tilde on its own (~
) renders a white space with no line breaking.
InMediaWikisyntax,four tildes are used as a shortcut for a user's signature.
InCommon Lisp,the tilde is used as the prefix for format specifiers in format strings.[63]
InMax/MSP,a tilde is used to denote objects that process at the computer's sampling rate, i.e. mainly those that deal with sound.
InStandard ML,the tilde is used as the prefix for negative numbers and as the unary negation operator.
InOCaml,the tilde is used to specify the label for a labeled parameter.
InR,the tilde operator is used to separate the left- and right-hand sides in a model formula.[64]
InObject REXX,the twiddle is used as a "message send" symbol. For example,Employee.name~lower()
would cause thelower()
method to act on the objectEmployee
'sname
attribute, returning the result of the operation.~~
returns the object that received the method rather than the result produced. Thus it can be used when the result need not be returned or when cascading methods are to be used.team~~insert( "Jane" )~~insert( "Joe" )~~insert( "Steve" )
would send multiple concurrentinsert
messages, thus invoking theinsert
method three consecutive times on theteam
object.
InRaku,~~
is used instead of=~
for aregular expression.Because the dot operator is used for member access instead of->
,concatenationis done with a single tilde.
my$concatResult="Hello"~"world!";
$concatResult~~/<|w><[A..Z]><[a..z]>*<|w>/;
say$/;# outputs "Hello"
# the $/ variable holds the last regex match result
Keyboards
[edit]The presence (or absence) of a tilde engraved on the keyboard depends on the territory where it was sold. In either case, computer's system settings determine thekeyboard mappingand the default setting will match the engravings on the keys. Even so, it certainly possible to configure a keyboard for a different locale than that supplied by the retailer. On American and British keyboards, the tilde is a standard keytop and pressing it produces a free-standing "ASCII Tilde". To generate a letter with a tilde diacritic requires theUS internationalorUK extendedkeyboard setting.
- With US-international, the `/~ key is adead key:pressing the~key and then a letter produces the tilde-accented form of that letter. (For example,~aproducesã.) With this setting active, an ASCII tilde can be inserted with the dead key followed by the space bar, or alternatively by striking the dead key twice in a row.
- With UK-extended, the key works normally but becomes a 'dead key' when combined withAltGr.ThusAltGr+#followed by a letter produces the accented form of that letter.
- With aMaceither of the Alt/Optionkeys function similarly.
- WithLinux,thecompose keyfacility is used.
Instructions for other national languages and keyboards are beyond the scope of this article.
In the US and EuropeanWindowssystems, theAlt codefor a single tilde is126
.
Backup filenames
[edit]The dominantUnixconvention for naming backup copies of files is appending a tilde to the original file name. It originated with theEmacstext editor[65]and was adopted by many other editors and some command-line tools.
Emacs also introduced an elaborate numbered backup scheme, with files namedfilename.~1~,filename.~2~and so on. It didn't catch on, as the rise ofversion controlsoftware eliminates the need for this usage.
Microsoft filenames
[edit]The tilde was part ofMicrosoft'sfilename manglingscheme when it extended theFATfile system standard to support long filenames forMicrosoft Windows.Programs written prior to this development could only access filenames in the so-called8.3 format—the filenames consisted of a maximum of eight characters from a restricted character set (e.g. no spaces), followed by a period, followed by three more characters. In order to permit these legacy programs to access files in the FAT file system, each file had to be given two names—one long, more descriptive one, and one that conformed to the 8.3 format. This was accomplished with a name-mangling scheme in which the first six characters of the filename are followed by a tilde and a digit. For example, "Program Files"might become"PROGRA~1".[66]
The tilde symbol is also often used to prefix hidden temporary files that are created when a document is opened in Windows.[citation needed]For example, when a document "Document1.doc" is opened in Word, a file called "~$cument1.doc" is created in the same directory. This file contains information about which user has the file open, to prevent multiple users from attempting to change a document at the same time.[67]
Juggling notation
[edit]In thejuggling notationsystem Beatmap, tilde can be added to either "hand" in a pair of fields to say "cross the arms with this hand on top".Mills' Messis thus represented as (~2x,1)(1,2x)(2x,~1)*.[68]
See also
[edit]- Circumflex– Diacritic (^) in European scripts
- Caret (computing)– Typographical mark (^)
- Tittle– Diacritical mark, the dot of the letter i
- Double tilde (disambiguation)
- Backtick– Typographical mark (`) (Freestanding grave accent)
- Wave dash– East Asian character primarily used to represent a range
Notes
[edit]- ^alternative association for the samecode point
- ^ISO646 (and ASCII, which it includes) is a standard for 7-bit encoding, providing just 96 printable characters (and 32control characters). This was insufficient to meet the needs of Western European languages and so the standard specifies certaincode pointsthat are available for national variation. With the arrival of 8-bit "extended ASCII",this issue was largely mitigated, though not fully resolved untilUnicodewas established.
- ^See alsoAir quotes.
References
[edit]- ^"tilde".The Chambers Dictionary(9th ed.). Chambers. 2003.ISBN0-550-10105-5.
- ^"tilde".The American Heritage Dictionary of the English Language(5th ed.). HarperCollins.
- ^Martin, Charles Trice (1910). The record interpreter: a collection of abbreviations, Latin words and names used in English historical manuscripts and records (2nd ed.). London, preface, p.5[1]
- ^abMackenzie, Charles E. (1980).Coded Character Sets, History and Development(PDF).The Systems Programming Series (1 ed.).Addison-Wesley Publishing Company, Inc.ISBN978-0-201-14460-4.LCCN77-90165.Archived(PDF)from the original on May 26, 2016.RetrievedAugust 25,2019.
- ^"Meeting of CCITT Working Party on the New Telegraph Alphabet".CCITT. 15 May 1963.See Paragraph 3.
- ^L. L. Griffin, Chairman, X3.2 (29 November 1963)."Memorandum to Members, Alternates, and Consultants of A.S.A. X3.2 and task groups".US Department of the Navy. p. 8.
- ^"Character histories: notes on some ASCII code positions".
- ^"Second ISO draft proposal | 6 and 6 bit character codes for information processing interchange".ISO. December 1963.See paragraph 2
- ^"Swung dash",WordNet(search) (3.0 ed.)
- ^"26 argumentos para seguir defendiendo la Ñ".La Razón.11 January 2011.Retrieved31 January2016.
- ^AFP (18 November 2004)."Batalla de la Ñ: Una aventura quijotesca para defender el alma de la lengua".Periódico ABC Paraguay.Retrieved31 January2016.
- ^Diccionario de la lengua española,Real Academia Española
- ^abcde"Tilde".Wolfram/MathWorld. 3 November 2011.Retrieved11 November2011.
- ^abc"All Elementary Mathematics – Mathematical symbols dictionary".Bymath. Archived fromthe originalon 2 May 2015.Retrieved25 September2014.
- ^"Character design standards – Maths".Microsoft.
- ^abQuinn, Liam."HTML 4.0 Entities for Symbols and Greek Letters".HTML help.Retrieved11 November2011.
- ^"Math Symbols... Those Most Valuable and Important: Approximately Equal Symbol".Solving Math problems. 20 September 2010. Archived fromthe originalon 9 November 2011.Retrieved11 November2011.
- ^abBernstein, Joseph (5 January 2015)."The Hidden Language of The ~Tilde~".BuzzFeed News.
- ^Jess Kimball Leslie (5 June 2017)."The Internet Tilde Perfectly Conveys Something We Don't Have the Words to Explain".The Cut.
- ^"What Are Tildes ( ~ ) And How Do You Use Them?".Thesaurus.12 April 2022.
- ^Ortografía de la lengua española.Madrid: Real Academia Española. 2010. p. 279.ISBN978-84-670-3426-4.
- ^"Lema en la RAE".Real Academia Española.Retrieved10 October2015.
- ^Nestle, Eberhard(1888).Syrische Grammatik mit Litteratur, Chrestomathie und Glossar.Berlin: H. Reuther's Verlagsbuchhandlung. [translated to English asSyriac grammar with bibliography, chrestomathy and glossary,by R. S. Kennedy. London: Williams & Norgate 1889. p. 5].
- ^Lithuanian Standards Board (LST),proposal for a zigzag diacritic
- ^"R. M. de Azkue:" Euskara-Gaztelania-Frantsesa Hiztegia "/" Diccionario Vasco-Español-Francés "online -Tutorial de uso"(PDF)(in Spanish). Aurten Bai Fundazioa. p. 6.Retrieved12 February2024.
El autor usaba fuentes propias para representar fenómenos propios de algunos de los dialectos del euskera. Estos son los caracteres especiales utilizados en el diccionario: ã d̃ ẽ ĩ l̃ ñ õ s̃ t̃ ũ x̃.
- ^ "Tilde Definition".linfo.org.The Linux Information Project. 24 June 2005.Retrieved27 January2020.
- ^"Using a tilde with currency".Stackexchange.
- ^"Appendix 1: Shift_JIS-2004 vs Unicode mapping table",JIS X 0213:2004,X 0213.
- ^Shift-JIS to Unicode,Unicode.
- ^"Windows 932_81".Microsoft.Retrieved30 July2010.
- ^abCJK Symbols and Punctuation (Unicode 6.2)(PDF)(chart), Unicode, archived fromthe original(PDF)on 27 August 2013.
- ^Japanese National Committee on ISO/TC97/SC2.ISO-IR-87: Japanese Graphic Character Set for Information Interchange(PDF).ITSCJ/IPSJ.
{{citation}}
:CS1 maint: numeric names: authors list (link) - ^Japanese Industrial Standards Committee.ISO-IR-233: Japanese Graphic Character Set for Information Interchange, Plane 1 (Update of ISO-IR 228)(PDF).ITSCJ/IPSJ.
- ^Halfwidth and Fullwidth Forms(PDF)(chart), Unicode.
- ^abErrata Fixed in Unicode 8.0.0,Unicode
- ^"windows-949-2000 (lead byte A1)".ICU Demonstration – Converter Explorer.International Components for Unicode.
- ^ab"Lead Byte A1-A2 (Code page 949)".MSDN.Microsoft. 6 February 2008.
- ^"ibm-1363_P110-1997 (lead byte A1)".ICU Demonstration – Converter Explorer.International Components for Unicode.
- ^"euc-kr (lead byte A1)".ICU Demonstration – Converter Explorer.International Components for Unicode.
- ^ab"Map (external version) from Mac OS Korean encoding to Unicode 3.2 and later".Apple.
- ^CJK Symbols and Punctuation(PDF)(chart), Unicode
- ^Komatsu, Hiroyuki,L2/14-198: Proposal for the modification of the sample character layout of WAVE_DASH (U+301C)(PDF)
- ^Shift_JIS-2004 (JIS X 0213:2004 Appendix 1) vs Unicode mapping table,x0213.org
- ^"Shift_JIS visualization",Encoding Standard,WHATWG
- ^Derbyshire, J (2004),Prime Obsession: Bernhard Riemann and the Greatest Unsolved Problem in Mathematics,New York: Penguin.
- ^"Tilde".Wolfram Research.Retrieved4 June2018.
- ^Choy, Stephen TL; Jesudason, Judith Packer; Lee, Peng Yee (1988).Proceedings of the Analysis Conference, Singapore 1986.Elsevier.ISBN9780080872612.
- ^Wallrapp (1994). "Standardization of flexible body modeling in multibody system codes, Part I: Definition of Standard Input Data".Mechanics of Structures and Machines.22(3): 283–304.doi:10.1080/08905459408905214.
- ^Valembois, R. E.; Fisette, P.; Samin, J. C. (1997). "Comparison of Various Techniques for Modelling Flexible Beams in Multibody Dynamics".Nonlinear Dynamics.12(4): 367–397.doi:10.1023/A:1008204330035.S2CID122487067.
- ^Collinge (2002)An Encyclopedia of Language,§4.2.
- ^Hayes, Bruce(2011).Introductory Phonology.John Wiley & Sons. pp. 87–88.ISBN9781444360134.
- ^Buring, Daniel (2016).Intonation and Meaning.Oxford University Press. pp. 36–41.doi:10.1093/acprof:oso/9780199226269.003.0003.ISBN978-0-19-922627-6.
- ^ab"Jargon File 5.0.1".5 January 2012. Archived fromthe originalon 27 August 2013.
- ^"Tilde expansion",C Library Manual,The GNU project,retrieved4 July2010.
- ^"Module mod_userdir",HTTP Server Documentation(version 2.0 ed.), The Apache foundation,retrieved4 July2010.
- ^T. Berners-Lee;R. Fielding;L. Masinter(January 2005).Uniform Resource Identifier (URI): Generic Syntax.Network Working Group.doi:10.17487/RFC3986.STD 66.RFC3986.Internet Standard 66.p. 12. ObsoletesRFC2732,2396and1808.Updated byRFC6874,7320and8820.UpdatesRFC1738.
- ^"MySQL:: Reference Manual:: Bit Functions and Operators".dev.mysql.Retrieved20 December2019.
- ^"The Groovy programming language – Operators".[permanent dead link]
- ^Groovy Regular Expression User Guide,Code haus, archived fromthe originalon 26 July 2010,retrieved11 November2010.
- ^Groovy RegExp FAQ,Code haus, archived fromthe originalon 11 July 2010,retrieved11 November2010.
- ^"Type Families",Haskell Wiki.
- ^"Lazy pattern match – HaskellWiki".
- ^"CLHS: Section 22.3".Lispworks. 11 April 2005.Retrieved30 July2010.
- ^The R Reference Index
- ^Emacs Manual
- ^"How Windows Generates 8.3 File Names from Long File Names".Microsoft.
- ^"Description of how Word creates temporary files".Microsoft Support.Archived fromthe originalon 19 September 2024.Retrieved3 October2024.
- ^"The Internet Juggling Database".Archived fromthe originalon 28 July 2005.Retrieved6 November2009.