Product Code Database
Example Keywords: glove -ring $28-175
   » » Wiki: Hyphen-minus
Tag Wiki 'Hyphen-minus'.
Tag

The symbol , known in as hyphen-minus, is the form of most commonly used in digital . On most keyboards, it is the only character that resembles a or a , so it is also used for these.

(2025). 9780596101213, O'Reilly. .
The name hyphen-minus derives from the original standard, where it was called hyphen (minus). The character is referred to as a hyphen, a minus sign, or a dash according to the context where it is being used.


Description
In early and character encodings, a single key/code was almost always used for hyphen, minus, various dashes, and strikethrough, since they all have a similar appearance. The current specifies distinct characters for several different , an unambiguous (sometimes called the Unicode minus) at U+2212, an unambiguous (sometimes called the Unicode hyphen) at U+2010, the hyphen-minus at U+002D and a variety of other hyphen symbols for various uses. When a hyphen is called for, the hyphen-minus is a common choice as it is well known, easy to enter on keyboards, and still the only form recognized by many data formats and computer languages. Though the Unicode Standard states that the U+2010 hyphen is "preferred" over the hyphen-minus, the standard itself uses the hyphen-minus as its hyphen character.

In most modern , the hyphen-minus is either identical or very similar to the Unicode hyphen.

In mathematical texts that include the plus sign, the Unicode minus is preferred to the hyphen-minus, because its metrics match the plus sign in level and length.


Uses

Typing
This character is typed when a hyphen or a minus sign is wanted. Based on old typewriter conventions, it is common to use a pair to represent an ,
(2025). 9780321385444, Adobe Press. .
and to put spaces around it to represent a spaced en dash ; this practice is deprecated in professional .
(2025). 9780881792065, Hartley & Marks, Publishers. .
Some these to the correct dash. The character can also be typed multiple times to simulate a horizontal line (though in most cases, repeated entry of the underscore will produce a solid line). Alternating the hyphen-minus with spaces produces a "dashed" line, often to indicate where paper is to be cut. On a typewriter, over-striking a section of text with this is used for .


Programming languages
Some programming languages use the hyphen-minus for denoting subtraction and , often called negation in this context. It is rarely used to indicate a range, due to ambiguity with subtraction. Generally, other characters, such as the Unicode are not recognized as an operator.

In some programming languages (for example ) (two hyphen-minus) mark the beginning of a comment. It can be used to start the in news system. uses (three hyphen-minuses) to end a section.


Command line
The hyphen-minus character is often used when specifying command-line options, a convention popularized by . Examples of the "short" form are -R or . A user can specify both by using -Rq. Some implementations allow two hyphen-minuses to specify "long" option names as or . These are easier to understand when reading commands (some software does not care about the number of hyphen-minuses, and either does not allow combinations of single-letter options, or requires the user to rearrange them, so they do not match a long option). A double hyphen-minus by itself (followed by a space) indicates that there are no more options, which is useful when one needs to specify a filename that starts with a hyphen-minus. An option of just a hyphen-minus (followed by a space) may be recognized of a filename and indicates that is to be read.


output
is used to denote deleted lines in [[diff]] output in the  or the .
     


Encoding
The glyph has a in as . It is also in with the same value.


See also
  • -- (disambiguation)
  • (—)
  • Box-drawing characters including (U+2500), useful for drawing horizontal lines


Explanatory notes

External links
Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

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

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs