0% found this document useful (0 votes)
41 views2 pages

Tilde - Wikipedia

dr

Uploaded by

naebookreader
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views2 pages

Tilde - Wikipedia

dr

Uploaded by

naebookreader
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Tilde

Article Talk

This article is about the punctuation and diacritical


mark. For the Swedish singer, see Tilde (singer).
"~" redirects here. For the album, see ~ (album).

The tilde (/ˈtɪld, -di, -dǝ, -deɪ/)[1] ˜ or ~, is a


grapheme with a number of uses. The name of
the character came into English from Spanish,
which in turn came from the Latin titulus,
meaning 'title' or 'superscription'.[2] Its primary
use is as a diacritic (accent) in combination
with a base letter. Its freestanding form is used
in modern texts mainly to indicate
approximation.

~ ◌̃
Tilde (symbol), Combining tilde
(diacritic)

In Unicode U+007E ~ TILD


U+0303 ◌̃ COMBINING
TILD

Related

See also Double tilde


(disambiguation)
U+301C WAV DASH

This page uses notation for orthographic or


other linguistic analysis. For the meaning of how
⟨ ⟩ , | | , / / , and [ ] are used here, see
this page.

History

Usage

Letters with tilde

Unicode encodes a number of cases of "letter


with tilde" as precomposed characters and
these are displayed below. In addition, many
more symbols may be composed using the
combining character facility (U+0303 ◌̃
COMBINING TILD, U+0330 ◌̰ COMBINING TILD
BLOW and 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.

Tilde ◌̃
Latin: Ã ã · Ẵ ẵ · Ẫ ẫ · ᵬ · ᵭ · Ẽ ẽ ·
Ễễ · Ḛḛ · ᵮ · Ĩĩ · Ḭḭ · ɫ · ᵯ · Ññ · ᵰ ·
Õõ · Ỗỗ · Ỡỡ · Ṍṍ · Ṏṏ · Ȭȭ · ᵱ
·ᵳ·ᵲ· · ᵴ · ᵵ · Ũũ · Ữữ · Ṹṹ ·
Ṵṵ · Ṽṽ · Ỹỹ · ᵶ
A tilde diacritic can be added to almost any
character by using a combining tilde. Greek
and Cyrillic letters with tilde (Α͂ ᾶ, Η͂ ῆ, Ι ͂ ῖ, ῗ, Υ͂ ῦ,
ῧ and А̃ а̃, Ә̃ ǝ̃, Е̃ е̃, И̃ и̃, О̃ о̃, У̃ у̃, Ј̃ j̃ ) are formed
using this method.

Common use in English

The English language does not use the tilde as


a diacritic, though it is used in some
loanwords. The standalone form of the symbol
is used more widely. Informally,[13] it means
"approximately", "about", or "around", such as
"~30 minutes before", meaning "approximately
30 minutes before".[14][15] It may also mean
"similar to",[16] including "of the same order of
magnitude as",[13] such as "x ~ y" meaning that
x and y are of the same order of magnitude.
Another approximation symbol is the double
tilde ≈, meaning "approximately/almost equal
to".[14][16][17] The tilde is also used to indicate
congruence of 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, BuzzFeed
journalist Joseph Bernstein interprets the
tildes in the following tweet:

"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


on social media to indicate sarcasm.[19] It may
also be used online, especially in informal
writing such as fanfiction, to convey a cutesy,
playful, or flirtatious tone.[20]

Diacritical use

In some languages, the tilde is a diacritic mark


placed over a letter to indicate a change in its
pronunciation:

Pitch

The tilde was firstly used in the polytonic


orthography of Ancient Greek, as a variant of
the circumflex, representing a rise in pitch
followed by a return to standard pitch.

Abbreviation

Carta marina showing Finnish


economy, with the captions Hic
fabricantur naves and Hic
fabricantur bombarde abbreviated

Later, it was used to make abbreviations in


medieval Latin documents. 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 (compare the
development of the umlaut as 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 in French as a
means of reducing text length until the 17th
century. It was also used in Portuguese and
Spanish.

The tilde was also used occasionally to make


other abbreviations, such as over the letter ⟨q⟩,
making q̃ , to signify the word que ("that").

Nasalization

It is also as a small ⟨n⟩ that the tilde originated


when written above other letters, marking a
Latin ⟨n⟩ which had been elided in old Galician-
Portuguese. In modern Portuguese it indicates
nasalization of the base vowel: mão "hand",
from Lat. manu-; razões "reasons", from Lat.
rationes. This usage has been adopted in the
orthographies of several native languages of
South America, such as Guarani and
Nheengatu, as well as in the International
Phonetic Alphabet (IPA) and many other
phonetic alphabets. For example, [ljɔ̃] is the
IPA transcription of the pronunciation of the
French place-name Lyon.

In Breton, 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 the DMG romanization of Tunisian Arabic,


the tilde is used for nasal vowels õ and ṏ.

Palatal n

Main article: Ñ

The tilded ⟨n⟩ (⟨ñ⟩, ⟨Ñ⟩) developed from the


digraph ⟨nn⟩ in Spanish. In this language, ⟨ñ⟩ is
considered a separate letter called eñ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 word tilde actually refers to
diacritics in general, e.g. the acute accent in
José,[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 the palatal nasal consonant /ɲ/ include

Asturian Iñupiaq

Aymara Mapudungun

Basque Papiamento

Chamorro Quechua

Filipino Spanish

Galician Tetum

Guaraní Wolof

Tone

In Vietnamese, a tilde over a vowel represents


a creaky rising tone (ngã). Letters with the tilde
are not considered separate letters of the
Vietnamese alphabet.

International Phonetic Alphabet

This section does not cite any sources.


(June 2024)

In phonetics, a tilde is used as a diacritic that is


placed above a letter, below it or
superimposed onto the middle of it:

A tilde above a letter indicates nasalization,


e.g. [ã], [ṽ].

A tilde superimposed onto the middle of a


letter indicates velarization or
pharyngealization, e.g. [ɫ], [z̴ ]. If no
precomposed Unicode character exists, the
Unicode character U+0334 ◌̴ COMBINING TILD
OVRLAY can be used to generate one.

A tilde below a letter indicates laryngealisation,


e.g. [d̰ ]. If no precomposed Unicode character
exists, the Unicode character U+0330 ◌̰
COMBINING TILD BLOW can be used to
generate one.

A tilde between two phonemes indicates


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

In Estonian, the symbol ⟨õ⟩ stands for the


close-mid back unrounded vowel, and it is
considered an independent letter.

Other uses

Some languages and alphabets use the tilde


for other purposes, such as:

Arabic script: A symbol resembling the tilde


(U+0653 ٓ ‫ ـ‬ARABIC MADDAH ABOV) 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 in
Unicode) stands for the velar nasal consonant.
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 letter Kaph


represents a [t͡ʃ] sound, transliterated as ch or
č.[23]

Estonian and Võro use the tilde above the letter


o (õ) to indicate the vowel [ɤ], a rare sound
among languages.

Unicode has a combining vertical tilde


character: U+033E ◌̾ COMBINING VRTICAL
TILD. It is used to indicate middle tone in
linguistic transcription of certain dialects of the
Lithuanian language,[24] and was also used
historically in the letter х̾, which was part of the
Polish Cyrillic alphabet of 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

The tilde is used in various ways in


punctuation, including:

Range

In some languages (such as in French),


[citation needed]
a tilde or a tilde-like wave dash
(Unicode: U+301C WAV DASH) may be used
as a punctuation mark (instead of an unspaced
hyphen, en dash or em dash) between two
numbers, to indicate a range. Doing so avoids
the risk of confusion with subtraction or 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 languages almost always use this
convention, but it is sometimes done for clarity
in some other languages as well. Chinese uses
the wave dash and full-width em dash
interchangeably for this purpose. In English,
the tilde is often used to express ranges and
model numbers in electronics, but rarely in
formal grammar or in type-set documents, as a
wavy dash preceding a number sometimes
represents an approximation (see below).

The range tilde is used for various purposes in


French, but only to denote ranges of numbers
(e.g., « 21~32 degrés Celsius »" means "21 to
32 degrees Celsius")[citation needed]

(The symbol U+2248 ≈ ALMOST QUAL TO (a


double tilde) is also used in French, for
example, « ≈400 mètres » means
"approximately 400 meters"[citation needed].)

Approximation

See also: Approximation

Before a number the tilde can mean


'approximately'; '~42' means 'approximately
42'.[26] When used with currency symbols that
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 other
symbols used to express approximation.

Japanese

Further information: Japanese punctuation § Wave


dash

The wave dash ( , nami dasshu) is


used for various purposes in Japanese,
including to denote ranges of numbers (e.g.,
5 10 means 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 a colon is used in
English.

When used in conversations via email or


instant messenger it may be used as a
sarcasm mark [citation needed].

The sign is used as a replacement for the


chōon, katakana character, in Japanese,
extending the final syllable.

Unicode and Shift JIS encoding of wave


dash

Correct JIS Previous


wave dash, Unicode wave
current in dash
Unicode (incorrect)

In practice the full-width tilde ( ,


zenkaku chiruda) (Unicode U+FF5E
FULLWIDTH TILD), is often used instead of the
wave dash ( , nami dasshu) (Unicode
U+301C WAV DASH), because the Shift JIS
code for the wave dash, 0x8160, which should
be mapped to U+301C,[28][29] is instead
mapped to U+FF5E[30] in Windows code page
932 (Microsoft's code page for 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+FF5E FULLWIDTH 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 the classic Mac OS and macOS,
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 Korean


KS X 1001 character set, in which Microsoft
maps the EUC-KR or UHC code for the wave
dash (0xA1AD) to U+223C ∼ TILD OPRATOR,
[36][37]
while IBM and Apple map it to U+301C.
[38][39][40]
Microsoft also uses U+FF5E to map
the KS X 1001 raised tilde (0xA2A6),[37] while
Apple uses U+02DC ˜ SMALL TILD.[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 discontinued Windows 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 of JIS X 0213,[43]
whereas the WHATWG Encoding Standard
used by HTML5 follows 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

As a unary operator

A tilde in front of a single quantity can mean


"approximately", "about"[14] or "of the same
order of magnitude as."

In written mathematical logic, the tilde


represents negation: "~p" means "not p",
where "p" is a proposition. Modern use often
replaces the tilde with the negation symbol (¬)
for this purpose, to avoid confusion with
equivalence relations.

As a relational operator

In mathematics, the tilde operator (which can


be represented by a tilde or the dedicated
character U+223C ∼ TILD OPRATOR),
sometimes called "twiddle", is often used to
denote an equivalence relation between two
objects. Thus "x ~ y" means "x is equivalent to
y". It is a weaker statement than stating that x
equals y. The expression "x ~ y" is sometimes
read aloud as "x twiddles y", 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 the
asymptotic equality of two functions. For
example, f (x) ~ g(x) means that
.[13]

A tilde is also used to indicate "approximately


equal to" (e.g. 1.902 ~= 2). This usage
probably developed as a typed alternative to
the libra symbol used 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 (≃). The symbol "≈" is
also used for this purpose.

In physics and astronomy, a tilde can be used


between two expressions (e.g. h ~ 10−34 J s) to
state that the two are of the same order of
magnitude.[13]

In statistics and probability theory, the tilde


means "is distributed as";[13] see random
variable(e.g. X ~ B(n,p) for a binomial
distribution).

A tilde can also be used to represent


geometric similarity (e.g. ∆ABC ~ ∆DEF,
meaning triangle ABC is similar to DEF). A
triple tilde (≋) is often used to show
congruence, an equivalence relation in
geometry.

In graph theory, the tilde can be used to


represent adjacency between vertices. The
edge connects vertices and which
can be said to be adjacent, and this adjacency
can be denoted .

As a diacritic

The symbol " " is pronounced as "eff tilde"


or, informally, as "eff twiddle".[46][47] This can
be used to denote the Fourier transform of f, or
a lift of f, and can have a variety of other
meanings depending on the context.

A tilde placed below a letter in mathematics


can represent a vector quantity (e.g.
).

In statistics and probability theory, a tilde


placed on top of a variable is sometimes used
to represent the median of that variable; thus
would indicate the median of the variable .
A tilde over the letter n ( ) is sometimes used
to indicate the harmonic mean.

In machine learning, a tilde may represent a


candidate value for a cell state in GRUs or
LSTM units. (e.g. c̃ )

Physics

Often in physics, one can consider an


equilibrium solution to an equation, and then a
perturbation to that equilibrium. For the
variables in the original equation (for instance
) a substitution can be made,
where is the equilibrium part and is the
perturbed part.

A tilde is also used in particle physics to


denote the hypothetical supersymmetric
partner. For example, an electron is referred to
by the letter e, and its superpartner the
selectron is written ẽ.

In multibody mechanics, the tilde operator


maps three-dimensional vectors to
skew-symmetrical matrices
(see [48] or
[49]
).

Economics

For relations involving preference, economists


sometimes use the tilde to represent
indifference between two or more bundles of
goods. For example, to say that a consumer is
indifferent between bundles x and y, an
economist would write x ~ y.

Electronics

It can approximate the sine wave symbol (∿,


U+223F), which is used in electronics to
indicate alternating current, in place of +, −, or
⎓ for direct current.

Linguistics

The tilde may indicate alternating allomorphs


or morphological alternation, as in //ˈniː~ɛl+t//
for kneel~knelt (the plus sign '+' indicates a
morpheme boundary).[50][51]

The tilde may represent some sort of phonetic


or phonemic variation between two sounds,
which might be allophones or in free variation.
For example, [χ ~ x] can represent "either [χ]
or [x]".

In formal semantics, it is also used as a


notation for the squiggle operator which plays
a key role in many theories of focus.[52]

Computing

Computer programmers use the tilde in various


ways and sometimes call the symbol (as
opposed to the diacritic) a squiggle, squiggly,
swiggle, or twiddle. According to the Jargon
File, other synonyms sometimes used in
programming include not, approx, wiggle,
enyay (after eñe) and (humorously) sqiggle
/ˈskɪɡǝl/.

Directories and URLs

On Unix-like operating systems (including AIX,


BSD, Linux and macOS), tilde normally
indicates the current user's home directory.
For example, if the current user's home
directory is /home/user, then the command
cd ~ is equivalent to cd /home/user, cd
$HOME, or cd. This convention derives from
the Lear-Siegler ADM-3A terminal 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., ~janedoe for the
home directory of user janedoe, such as
/home/janedoe).[53]

Used in URLs on the World Wide Web, it often


denotes a personal website on a Unix-based
server. For example,
http://www.example.com/~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 a subdirectory in
the user's home directory, such as
/home/username/public_html or
/home/username/www.[54]

In URLs, the characters %7E (or %7e) may


substitute for a tilde if an input device lacks a
tilde key.[55] Thus,
http://www.example.com/~johndoe/
and
http://www.example.com/%7Ejohndoe/
will behave in the same manner.

Computer languages

The tilde is used in the AWK programming


language as part of the pattern match
operators for regular 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 in Perl, and this semi-
standardization has led to the use of these
operators in other programming languages,
such as Ruby or the SQL variant of the
database PostgreSQL.

In APL and MATLAB, tilde represents the


monadic logical function NOT, and in APL it
additionally represents the dyadic multiset
function without (set difference).

In C the tilde character is used as bitwise NOT


unary operator, 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 as C++, D, C# and Julia.
The MySQL database also use tilde as bitwise
invert[56] as does Microsoft's SQL Server
Transact-SQL (T-SQL) language. JavaScript
also 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 a class's method name (where the
rest of the name must be the same name as
the class) to indicate a destructor – a special
method which is called at the end of the
object's life.

In ASP.NET application tilde ('~') is used as a


shortcut to the root of the application's virtual
directory.

In the CSS stylesheet language, the tilde is


used for the indirect adjacent combinator as
part of a selector.

In the D programming language, the tilde is


used as an array concatenation operator, 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 (similarly
PHP programming language solved this
problem by using dot operator for
concatenation, and + for number addition,
which will also work on strings containing
numbers).

In Eiffel, the tilde is used for object


comparison. If a and b denote objects, the
Boolean expression a ~ b has value true if and
only if these objects are equal, as defined by
the applicable version of the library routine
is_equal, which by default denotes field-by-
field object equality but can be redefined in
any class to support a specific notion of
equality. If a and b are references, the object
equality expression a ~ b is to be contrasted
with a = b which denotes reference equality.
Unlike the call a.is_equal (b), the expression a
~ b is type-safe even in the presence of
covariance.

In the Apache Groovy programming language


the tilde character is used as an operator
mapped to the bitwiseNegate() method.[57]
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.[58][59]

In Haskell, the tilde is used in type constraints


to indicate type equality.[60] Also, in pattern-
matching, the tilde is used to indicate a lazy
pattern match.[61]

In the Inform programming language, the tilde


is used to indicate a quotation mark inside a
quoted string.

In "text mode" of the LaTeX typesetting


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 . The
url 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.

In MediaWiki syntax, four tildes are used as a


shortcut for a user's signature.

In Common Lisp, the tilde is used as the prefix


for format specifiers in format strings.[62]

In Max/MSP, a tilde is used to denote objects


that process at the computer's sampling rate,
i.e. mainly those that deal with sound.

In Standard ML, the tilde is used as the prefix


for negative numbers and as the unary
negation operator.

In OCaml, the tilde is used to specify the label


for a labeled parameter.

In R, the tilde operator is used to separate the


left- and right-hand sides in a model formula.
[63]

In Object REXX, the twiddle is used as a


"message send" symbol. For example,
Employee.name~lower() would cause the
lower() method to act on the object
Employee 's name 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
concurrent insert messages, thus invoking
the insert method three consecutive times
on the team object.

In Raku, ~~ is used instead of =~ for a


regular expression. Because the dot operator
is used for member access instead of -> ,
concatenation is 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

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 the keyboard
mapping and 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 the US
international or UK extended keyboard setting.

With US-international, the `/~ key is a dead


key: pressing the ~ key and then a letter
produces the tilde-accented form of that letter.
(For example, ~ a produces ã .) 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 with
AltGr. Thus AltGr + # followed by a letter
produces the accented form of that letter.

With a Mac either of the Alt/Option keys


function similarly.

With Linux, the compose key facility is used.

Instructions for other national languages and


keyboards are beyond the scope of this article.

In the US and European Windows systems, the


Alt code for a single tilde is 126 .

Backup filenames

The dominant Unix convention for naming


backup copies of files is appending a tilde to
the original file name. It originated with the
Emacs text editor[64] and was adopted by
many other editors and some command-line
tools.

Emacs also introduced an elaborate numbered


backup scheme, with files named
filename.~1~, filename.~2~ and so on. It
didn't catch on, as the rise of version control
software eliminates the need for this usage.

Microsoft filenames

The tilde was part of Microsoft's filename


mangling scheme when it extended the FAT file
system standard to support long filenames for
Microsoft Windows. Programs written prior to
this development could only access filenames
in the so-called 8.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".

The tilde symbol is also often used to prefix


hidden temporary files that are created when a
document is opened in Windows. 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.

Juggling notation

In the juggling notation system Beatmap, tilde


can be added to either "hand" in a pair of
fields to say "cross the arms with this hand on
top". Mills' Mess is thus represented as (~2x,1)
(1,2x)(2x,~1)*.[65]

See also

Notes

References

External links

Last edited 5 days ago by RodRabelo7

Content is available under CC BY-SA 4.0 unless


otherwise noted.

Terms of Use • Privacy policy • Desktop

You might also like