Number sign
The symbol is known as the number sign, hash, the pound sign, and has a variety of other names. The symbol has historically been used for a wide range of purposes including the designation of an ordinal number and as a ligatured abbreviation for pounds avoirdupois – having been derived from the now-rare.
Since 2007, widespread usage of the symbol to introduce metadata tags on social media platforms has led to such tags being known as 'hashtags', and from that, the symbol itself is sometimes incorrectly called a hashtag.
The symbol is distinguished from similar symbols by its combination of level horizontal strokes and right-tilting vertical strokes.
History
Names
Number sign
Number sign is the name chosen by the Unicode Consortium. Most common in Canada and the northeastern United States. American telephone equipment companies which serve Canadian callers often have an option in their programming to denote Canadian English, which in turn instructs the system to say "number sign" to callers instead of "pound". This name is rarely used elsewhere in the world, where numbers are normally represented by the letters.Pound sign or pound
In the United States and Canada, the key on a phone is commonly referred to as the pound sign, pound key, or simply pound. Dialing instructions to an extension such as, for example, can be read as "pound seven seven". This name is rarely used elsewhere, as the term pound sign is understood to mean the currency symbol £.Hash
In the United Kingdom and Australia, it is frequently called a hash. This is also called a or.The term hash sign is found in South African writings from the late 1960s.
Programmers also use this term; for instance is "hash, bang" or "shebang".
Hashtag
Derived from the previous, the word hashtag is often used when reading social media messages aloud, indicating the start of a hashtag. For instance, the text is often read out loud as "hashtag foo". This leads to the common belief that the symbol itself is called hashtag. Twitter documentation referred to it as "the hashtag symbol".Hex
The term hex is commonly used in Singapore and Malaysia, as spoken by many recorded telephone directory-assistance menus: "Please enter your phone number followed by the 'hex' key". The term hex is formally discouraged in Singapore in favour of hash. In Singapore, the symbol is also called "hex" in apartment addresses, where it precedes the floor number.Octothorp, octothorpe, octathorp, octatherp
The word was invented by workers at the Bell Telephone Laboratories by 1968, who wanted to add an eleventh and a twelfth key to the telephone keypad and needed named symbols to identify them. While there is typically agreement that octo- or octa- is here the common prefix meaning eight, various stories abound about the nature of the thorp. Don MacPherson is said to have created the word by combining octo and the last name of Jim Thorpe, an Olympic medalist. Lauren Asplund declared that he and Howard Eby invented the word in 1964:Doug Kerr has written two essays about his recollections on the subject. In the first, in 2006, he wrote:
Later, in 2014, after conferring with Asplund, Kerr concluded that the name had likely been invented by Asplund after all:
The Merriam-Webster New Book of Word Histories, has a long article which says "octotherp" was the original spelling, and that the word arose in the 1960s among telephone engineers as a joke. It concludes, after dismissing various other parochial theories:
Other hypotheses for the origin of the word include the last name of James Oglethorpe.
The first appearance of octothorp in a US patent is in a 1973 filing. This patent also refers to the complementary telephone star key as "the sextile or asterisk key".
Sharp
Use of the name sharp is due to the symbol's resemblance to. The same derivation is seen in the name of the Microsoft programming languages C#, J# and F#. Microsoft says that the name C# is pronounced 'see sharp'". According to the ECMA-334 C# Language Specification, the name of the language is written "C#" followed by the # and pronounced "C Sharp".Square
On telephones, the International Telecommunication Union specification ITU-T E.161 3.2.2 states: "The symbol may be referred to as the square or the most commonly used equivalent term in other languages." Formally, this is not a number sign but rather another character,. The real or virtual keypads on almost all modern telephones use the simple instead, as does most documentation.Usage
When prefixes a number, it is read as 'number'. "A #2 pencil", for example, indicates "a number-two pencil". This usage is historically rarer in print than the abbreviation, although '#' has recently overtaken 'No.' in total popularity worldwide, stemming from its newfound relatively overwhelming popularity in American English. In addition to 'No.' and '#', the symbol or just the word 'number' are also used. When used in this manner, # is often superscript, like: "a #2 pencil" — but typically not extending above the cap line.When is after a number, it is read as 'pound' or 'pounds', meaning the unit of weight. The text "5# bag of flour" would mean "five-pound bag of flour". This is rare outside North America.
Mathematics
- In set theory, #S is one possible notation for the cardinality or size of the set S, instead of. That is, for a set, in which all are mutually distinct, This notation is only sometimes used for finite sets, usually in number theory, to avoid confusion with the divisibility symbol, e.g..
- In topology, A#''B is the connected sum of manifolds A'' and B, or of knots A and B in knot theory.
- In number theory, n# is the primorial of n.
- In constructive mathematics, # denotes an apartness relation.
- In computational complexity theory, #P denotes a complexity class of counting problems. The standard notation for this class uses the number sign symbol, not the sharp sign from music, but it is pronounced "sharp P". More generally, the number sign may be used to denote the class of counting problems associated with any class of search problems.
Computing
- In Unicode and ASCII, the symbol has a code point as and entity code in HTML5.
- In many scripting languages and data file formats, especially ones that originated on Unix, introduces a comment that goes to the end of the line. The combination at the start of an executable file is a shebang, hash-bang or pound-bang, used to tell the operating system which program to use to run the script. This combination was chosen so it would be a comment in the scripting languages.
- In the C preprocessor, at the start of a line starts a preprocessor directive. Inside macros it is used for various purposes; for example is used for token concatenation.
- In Unix shells, is placed by convention at the end of a command prompt to denote that the user is working as root.
- is used in a URL of a web page or other resource to introduce a 'fragment identifier' an id which defines a position within that resource. In HTML, this is known as an anchor link. For example, in the URL the portion after the is the fragment identifier, in this case denoting that the display should be moved to show the tag marked by in the HTML.
- Internet Relay Chat: on servers, precedes the name of every channel that is available across an entire IRC network.
- In lightweight markup languages, such as wikitext, is often used to introduce numbered list items.
- In the Perl programming language, is used as a modifier to array syntax to return the index number of the last element in the array, e.g., an array's last element is at. The number of elements in the array is, since Perl arrays default to using zero-based indices. If the array has not been defined, the return is also undefined. If the array is defined but has not had any elements assigned to it, e.g.,, then returns. See the section on Array functions in the Perl language structure article.
- is used in the Modula-2 and Oberon programming languages designed by Niklaus Wirth and in the Component Pascal language derived from Oberon to denote the not equal symbol, as a stand-in for the mathematical unequal sign, being more intuitive than or. For example:
- In Rust, is used for attributes such as in.
- In OCaml, is the operator used to call a method.
- In Common Lisp, is a dispatching read macro character used to extend the S-expression syntax with short cuts and support for various data types.
- In Scheme, is the prefix for certain syntax with special meaning.
- In Standard ML,, when prefixed to a field name, becomes a projection function ; also, prefixes a string literal to turn it into a character literal.
- In Mathematica syntax,, when used as a variable, becomes a pure function.
- In LaTeX,, when prefixing a number, references an arguments for a user defined command. For instance
\newcommand . - In Javadoc, is used with the tag to introduce or separate a field, constructor, or method member from its containing class.
- In Redcode and some other dialects of assembly language, is used to denote immediate mode addressing, e.g.,, which means "load accumulator A with the value 10" in MOS 6502 assembly language.
- in HTML, CSS, SVG, and other computing applications is used to identify a color specified in hexadecimal format, e.g.,. This usage comes from X11 color specifications, which inherited it from early assembler dialects that used to prefix hexadecimal constants, e.g.: ZX Spectrum Z80 assembly.
- In Be-Music Script, every command line starts with. Lines starting with characters other than are treated as comments.
- The use of the hash symbol in a hashtag is a phenomenon conceived by Chris Messina, and popularized by social media network Twitter, as a way to direct conversations and topics amongst users. This has led to an increasingly common tendency to refer to the symbol itself as hashtag.
- In programming languages like PL/1 and Assembler used on IBM mainframe systems, as well as JCL, the are used as additional letters in identifiers, labels and data set names.
- In J, is the Tally or Count function, and similarly in Lua, can be used as a shortcut to get the length of a table, or get the length of a string. Due to the ease of writing over longer function names, this practice has become standard in the Lua community.
- In Dyalog APL, is a reference to the root namespace while is a reference to the current space's parent namespace.
- In Ada, the character is used in based integer literals, which take the form, where is an integer from 2 to 16 specifying the radix, and are the digits valid in that base.