'Dead key' operation On computer keyboards with a suitable
keyboard layout ('keyboard mapping'), the acts as a
dead key. When pressed, it has no immediate effect its effect is to apply a
diacritic to the next key pressed. • In the
UK extended and the
US-International layouts, the sequence adds a
grave accent (e.g., produces ). • In the New Zealand "NZ Aotearoa" layout, the sequence adds a
macron (e.g., produces ).
Command-line interface languages Many
command-line interface languages and the
scripting (programming) languages like
Perl,
PHP,
Ruby and
Julia (though see below) use pairs of backticks to indicate
command substitution. A command substitution is the
standard output from one command, into an embedded line of text within another command. For example, using $ as the symbol representing a terminal prompt, the code line: : In all POSIX
shells (including
Bash and
Zsh), the use of backticks for command substitution is now largely deprecated in favor of the notation $(...), so that the example above would be re-written: : The new syntax allows nesting, for example: :
Markup languages It is sometimes used in
source code comments to indicate code, e.g., : /* Use the `printf()` function. */ This is also the format the
Markdown formatter uses to indicate code. Some variations of Markdown support "fenced code blocks" that span multiple lines of code, starting (and ending) with three backticks in a row (```). •
TeX: The backtick character represents curly opening quotes. For example, ` is rendered as single opening curly quote () and `` is a double curly opening quote (). It also supplies the numeric ASCII value of an ASCII character wherever a number is expected.
Programming languages •
BBC BASIC: The backtick character is valid at the beginning of or within a variable, structure, procedure or function name. •
D and
Go: The backtick surrounds a
raw string literal. •
F#: Surrounding an identifier with double backticks allows the use of identifiers that would not otherwise be allowed, such as keywords, or identifiers containing punctuation or spaces. •
Haskell: Surrounding a function name by backticks makes it an
infix operator. •
JavaScript:
ECMAScript 6 standard introduced a "backtick" character which indicated a string or
template literal. Its applications include (but are not limited to): string interpolation (substitution), embedded expressions, and multi-line strings. In the following example name and pet variable's values get substituted into the string enclosed by grave accent characters: :: const name = "Mary", pet = "lamb"; // Set variables let temp = `${name} has a little ${pet}!`; console.log(temp); // => "Mary has a little lamb!"; •
Lisp macro systems: The backtick character (called '''' in
Scheme) introduces a quoted expression in which comma-substitution may occur. It is identical to the plain quote, except that a nested expression prefixed with a
comma is replaced with the value of that nested expression. If the nested expression happens to be a symbol (that is, a variable name in Lisp), the symbols' value is used. If the expression happens to be program code, the first value returned by that code is inserted at the respective location instead of the comma-prefixed code. This is roughly analogous to the Bourne shell's
variable interpolation with $ inside double quotes. •
Julia: Backticks make a command object, Cmd, that can be run, with run function, like run(`echo Hello world!`). You can interpolate Julia variables, but only indirectly shell environment variables. •
m4: A backtick together with an apostrophe quotes strings (to suppress or defer macro expansion). •
MySQL/
MariaDB: A backtick in queries is a delimiter for column, table, and database identifiers. •
OCaml: The backtick indicates polymorphic variants. • Pico: The backtick indicates comments in the programming language. •
PowerShell: The backtick is used as the escape character. For example, a newline character is denoted `n. Most common programming languages use a backslash as the escape character (e.g., \n), but because Windows allows the backslash as a path separator, it is impractical for PowerShell to use backslash for a different purpose. Two backticks produce the ` character itself. For example, the
nullable boolean of
.NET is specified in PowerShell as [Nullable``1[System.Boolean. •
Python: Prior to version 3.0, backticks were a synonym for the repr() function, which converts its argument to a string suitable for a programmer to view. However, this feature was removed in Python 3.0. Backticks also appear extensively in the
reStructuredText plain text markup language (implemented in the Python
docutils package). •
R: The backtick is used to surround non-syntactic variable names. This includes variable names containing special characters or
reserved words, among others. •
Racket: The backtick or "Quasiquote" is used to begin creating lists. •
Scala: An identifier may also be formed by an arbitrary string between backticks. The identifier then is composed of all characters excluding the backticks themselves. •
Tom: The backtick creates a new term or to calls an existing term. •
Unlambda: The backtick character denotes function application. •
Verilog HDL: The backtick is used at the beginning of compiler's directives. == Games ==