Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Number sign
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == When {{angbr|#}} prefixes a number, it is read as "number". "A #2 pencil", for example, indicates "a number-two pencil". This usage is rare in print,<ref>{{cite web|url= https://books.google.com/ngrams/graph?content=%22+%23+1+%22%2C%22+No.+1+%22&year_start=1800&year_end=2008&corpus=15&smoothing=3|title= Google Ngram Viewer|access-date= 2021-02-05|archive-date= 2024-04-05|archive-url= https://web.archive.org/web/20240405004325/https://books.google.com/ngrams/graph?content=%22+%23+1+%22%2C%22+No.+1+%22&year_start=1800&year_end=2008&corpus=15&smoothing=3|url-status= live}}</ref> or outside North America. Instead the abbreviation {{notatypo|'No.'}} or the symbol {{notatypo|'β'}} or just "number" is used.{{cn|date=November 2023}} When {{angbr|#}} is ''after'' a number, it is read as "pound" or "pounds", meaning the unit of weight.{{cn|date=May 2025}} The text "5# bag of flour" would mean "five-pound bag of flour". Again this is rare outside North America. === Mathematics === * In [[set theory]], #''S'' is one possible notation for the [[cardinality]] or size of the [[set (mathematics)|set]] ''S'', instead of <math>|S|</math>. That is, for a set <math>S = \{s_1,s_2,s_3, \dots , s_n\}</math>, in which all <math>s_i</math> are mutually distinct, <math>\#S = n = |S|.</math> This notation is only sometimes used for [[finite set]]s, usually in [[number theory]], to avoid confusion with the [[divisibility]] symbol, e.g. <math>a \mid b</math>. * In [[topology]], ''A''#''B'' is the [[connected sum]] of [[manifold]]s ''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|#P]] denotes a [[complexity class]] of [[counting problem (complexity)|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 {{unichar|0023}} and [[entity code]] {{code|#}} in [[HTML5]].<ref>HTML5 is the only version of HTML that has a named entity for the number sign, see https://www.w3.org/TR/html4/sgml/entities.html {{Webarchive|url=https://web.archive.org/web/20180401051616/http://www.w3.org/TR/html4/sgml/entities.html |date=2018-04-01 }} ("The following sections present the complete lists of character entity references.") and https://www.w3.org/TR/2014/CR-html5-20140731/syntax.html#named-character-references {{Webarchive|url=https://web.archive.org/web/20170805013240/http://www.w3.org/TR/2014/CR-html5-20140731/syntax.html#named-character-references |date=2017-08-05 }} ("num;").</ref> * In many scripting languages and data file formats, especially ones that originated on Unix, {{code|#}} introduces a comment that goes to the end of the line.<ref name="hash character">{{cite web |title=CSS Syntax and Selectors |url=https://www.w3schools.com/css/css_syntax.asp |website=W3Schools |access-date=2019-07-15 |archive-date=2019-07-12 |archive-url=https://web.archive.org/web/20190712051145/https://www.w3schools.com/css/css_syntax.asp |url-status=live }}</ref> The combination {{code|#!}} at the start of an executable file is a "[[Shebang (Unix)|shebang]]", "hash-bang" or "pound-bang", used to tell the operating system which program to use to run the script (see [[Magic number (programming)|magic number]]). This combination was chosen so it would be a comment in the scripting languages. ** {{code|#!}} is the symbol of the CrunchBang Linux distribution. * In the [[Perl]] programming language, {{code|#}} is used as a modifier to array syntax to return the index number of the last element in the [[Array data type|array]], e.g., an array's last element is at {{code|$array[$#array]}}. The number of elements in the array is {{code|$#array + 1}}, 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., {{code|1=@array = ()}}, then {{code|$#array}} returns {{code|β1}}. See the section on [[Perl language structure#Array functions|Array functions]] in the Perl language structure article. * In both the [[C preprocessor|C]] and [[C++]] preprocessors, as well as in other syntactically C-like languages, {{code|#}} is used to start a preprocessor [[Directive (programming)|directive]]. Inside macros, after {{code|#define}}, it is used for various purposes; for example, the double pound (hash) sign {{code|##}} is used for token [[concatenation]]. * In [[Unix shell]]s, {{code|#}} is placed by convention at the end of a [[command prompt]] to denote that the user is working as [[Superuser|root]]. * {{code|#}} 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 [[HTML element#Anchor|anchor link]]. For example, in the URL {{code|https://en.wikipedia.org/wiki/Number_sign#Computing}} the portion after the {{code|#}} ({{code|Computing}}) is the fragment identifier, in this case denoting that the display should be moved to show the tag marked by {{code|1=<span id="Computing">...</span>|2=html}} in the HTML.<ref>{{cite web|url=http://www.w3.org/TR/html4/intro/intro.html#fragment-uri|title=Introduction to HTML|access-date=16 September 2014|archive-date=16 August 2008|archive-url=https://web.archive.org/web/20080816014507/http://www.w3.org/TR/html4/intro/intro.html#fragment-uri|url-status=live}}</ref> * [[Internet Relay Chat]]: on (IRC) servers, {{code|#}} precedes the name of every [[IRC channels|channel]] that is available across an entire IRC network. * In [[blog]]s, {{code|#}} is sometimes used to denote a [[permalink]] for that particular weblog entry. * In [[lightweight markup language]]s, such as [[wiki]]text, {{code|#}} is often used to introduce numbered list items. * {{code|#}} is used in the [[Modula-2]] and [[Oberon (programming language)|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 {{char|β }}, being more intuitive than {{code|<>}} or {{code|1=!=}}. For example: {{nowrap|{{code|IF i # 0 THEN ...|cp}}}} * In [[Rust (programming language)|Rust]], {{code|#}} is used for attributes such as in {{code|#[test]}}. * In [[OCaml]], {{code|#}} is the operator used to call a method. * In [[Common Lisp]],<ref>{{cite web|url=http://www.lispworks.com/documentation/HyperSpec/Body/02_dh.htm|title=Lispworks.com|access-date=16 September 2014|archive-date=10 October 2014|archive-url=https://web.archive.org/web/20141010014731/http://www.lispworks.com/documentation/HyperSpec/Body/02_dh.htm|url-status=live}}</ref> {{code|#}} is a dispatching [[Lisp reader|read macro]] character used to extend the [[S-expression]] syntax with short cuts and support for various data types ([[complex number]]s, vectors and more). * In [[Scheme (programming language)|Scheme]], {{code|#}} is the prefix for certain syntax with special meaning. * In [[Standard ML]], {{code|#}}, when prefixed to a field name, becomes a projection function (function to access the field of a record or tuple); also, {{code|#}} prefixes a [[string literal]] to turn it into a character literal. * In [[Wolfram Mathematica|Mathematica]] syntax, {{code|#}}, when used as a variable, becomes a pure function (a placeholder that is mapped to any variable meeting the conditions). * In [[LaTeX]], {{code|#}}, when prefixing a number, references an arguments for a user defined command. For instance <syntaxhighlight lang="tex" inline>\newcommand{\code}[1]{\texttt{#1}}</syntaxhighlight>. * In [[Javadoc]],<ref>{{cite web|url=http://download.oracle.com/javase/1.5.0/docs/tooldocs/windows/javadoc.html#@see|title=Oracle.com|access-date=16 September 2014|archive-date=28 October 2011|archive-url=https://web.archive.org/web/20111028092204/http://download.oracle.com/javase/1.5.0/docs/tooldocs/windows/javadoc.html#@see|url-status=live}}</ref> {{code|#}} is used with the {{code|@see}} tag to introduce or separate a field, constructor, or method member from its containing class. * In [[Core War|Redcode]] and some other dialects of [[assembly language]], {{code|#}} is used to denote immediate mode addressing, e.g., {{code|LDA #10}}, which means "load accumulator A with the value 10" in [[MOS 6502]] assembly language. * in [[HTML]], [[Cascading Style Sheets|CSS]], [[Scalable Vector Graphics|SVG]], and other computing applications {{code|#}} is used to identify a color specified in [[hexadecimal]] format, e.g., {{code|#FFAA00}}. This usage comes from [[X11]] color specifications, which inherited it from early assembler dialects that used {{code|#}} to prefix hexadecimal constants, e.g.: ZX Spectrum [[Zilog Z80|Z80]] assembly.<ref>{{cite web|url=http://www.worldofspectrum.org/pub/sinclair/games-info/h/HiSoftDevpacV3.pdf|title=HISOFT DEVPAC ZX Spectrum Programmer's Manual|website=worldofspectrum.org|access-date=2017-10-03|archive-date=2018-11-12|archive-url=https://web.archive.org/web/20181112231113/http://www.worldofspectrum.org/pub/sinclair/games-info/h/HiSoftDevpacV3.pdf|url-status=live}}</ref> * In [[Be-Music Script]], every command line starts with {{code|#}}. 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 (open-source advocate)|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".<ref name="Time">{{Cite magazine|url=https://time.com/2870942/hashtag-oed-oxford-english-dictionary/|title=You'll Never Guess the Real Name for a Hashtag|last=Nicks|first=Denver|date=June 13, 2014|magazine=TIME|access-date=May 5, 2016|archive-date=May 11, 2016|archive-url=https://web.archive.org/web/20160511235410/http://time.com/2870942/hashtag-oed-oxford-english-dictionary/|url-status=live}}</ref> * In programming languages like PL/1 and Assembler used on IBM mainframe systems, as well as JCL (Job Control Language), the {{code|#}} (along with {{code|$}} and {{code|@}}) are used as additional letters in identifiers, labels and data set names. * In [[J (programming language)|J]], {{code|#}} is the ''Tally'' or ''Count'' function,<ref>{{cite web|url=https://code.jsoftware.com/wiki/Vocabulary/number|title=Vocabulary/number|access-date=November 20, 2019|website=J NuVoc|archive-date=February 14, 2020|archive-url=https://web.archive.org/web/20200214105150/https://code.jsoftware.com/wiki/Vocabulary/number|url-status=live}}</ref> and similarly in [[Lua (programming language)|Lua]], {{code|#}} 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 (programming language)|APL]], {{code|#}} is a reference to the root [[namespace]] while {{code|##}} is a reference to the current space's parent namespace. * In [[Ada (programming language)|Ada]], the {{code|#}} character is used in based integer literals, which take the form {{code|base#digits#}}, where {{code|base}} is an integer from 2 to 16 specifying the radix, and {{code|digits}} are the digits valid in that base (0-9, optionally A-F for bases above 10). === Other uses === * [[Algebraic notation (chess)|Algebraic notation for chess]]: A hash after a move denotes [[checkmate]]. * [[American Sign Language]] transcription: The hash prefixing an all-caps word identifies a lexicalized fingerspelled sign, having some sort of blends or letter drops. All-caps words without the prefix are used for standard English words that are fingerspelled in their entirety.<ref>{{cite web |last1=Vicars |first1=Bill |title=Lexicalization |url=http://www.lifeprint.com/asl101/topics/lexicalized_fingerspelling.htm |publisher=ASL University |access-date=6 September 2015 |archive-date=10 September 2015 |archive-url=https://web.archive.org/web/20150910183425/http://www.lifeprint.com/asl101/topics/lexicalized_fingerspelling.htm |url-status=live }}</ref> * [[copy writer|Copy writing]] and [[copy editing]]: Technical writers in [[press release]]s often use three number signs, {{char|###}} directly above the boilerplate or underneath the body copy, indicating to media that there is no further copy to come.<ref>{{cite web |title=###: What does ### mean at the end of a press release? |publisher=The Halo Group |url=https://www.thehalogroup.com/what-does-mean-at-the-end-of-a-press-release/ |first=Lara |last=Cohn |access-date=18 November 2021 |archive-date=17 November 2021 |archive-url=https://web.archive.org/web/20211117221859/https://www.thehalogroup.com/what-does-mean-at-the-end-of-a-press-release/ |url-status=live }}</ref> * [[Note (typography)|Footnote]] symbols (or endnote symbols): Due to ready availability in many fonts and directly on computer keyboards, "#" and other symbols (such as the [[caret]]) have in recent years begun to be occasionally used in catalogues and reports in place of more traditional symbols (esp. [[Dagger (mark)|dagger, double-dagger]], [[pilcrow]]). * Linguistic [[phonology]]: {{char|#}} denotes a word boundary. For instance, {{code|/d/ β [t] / _#}} means that {{char|/d/}} becomes {{char|[t]}} when it is the last segment in a word (i.e. when it appears before a word boundary). * Linguistic [[syntax]]: A hash before an example sentence denotes that the sentence is semantically ill-formed, though grammatically well-formed. For instance, "#The toothbrush is pregnant" is a grammatically correct sentence, but the meaning is odd.<ref>{{cite book|last=Carnie|first=Andrew|year=2006|title=Syntax: A Generative Introduction|location=Oxford|publisher=Wiley-Blackwell|isbn=1-4051-3384-8|edition=2nd|url-access=registration|url=https://archive.org/details/syntaxgenerative0000carn}}</ref><ref>{{Cite book | first=R. L. | last=Trask | author-link=Larry Trask | title=A Dictionary of Grammatical Terms in Linguistics | location=London | publisher=Routledge | year=1993 | isbn=0-415-08627-2 | page=125}}</ref> * [[Medical prescription]] drug delimiter: In some countries, such as [[Norway]] or [[Poland]], {{char|#}} is used as a [[delimiter]] between different drugs on medical prescriptions. * Medical shorthand: The hash is often used to indicate a [[bone fracture]].<ref>{{Cite web |url=http://radiographics.rsnajnls.org/cgi/reprint/23/1/195.pdf |title=Glossary of Medical Devices and Procedures: Abbreviations, Acronyms, and Definitions |access-date=2008-05-16 |archive-date=2008-06-25 |archive-url=https://web.archive.org/web/20080625213552/http://radiographics.rsnajnls.org/cgi/reprint/23/1/195.pdf |url-status=live }}</ref> For example, "#NOF" is often used for "fractured [[Femur neck|neck of femur]]". In radiotherapy, a full dose of radiation is divided into smaller doses or 'fractions'. These are given the shorthand {{char|#}} to denote either the number of treatments in a prescription (e.g. 60Gy in 30#), or the fraction number (#9 of 25). * As a [[List of proofreader's marks|proofreading mark]], to indicate that a space should be inserted.<ref>{{cite web |url=http://www.merriam-webster.com/mw/table/proofrea.htm |title=Proofreaders' Marks |access-date=2020-09-03 |archive-date=2010-08-16 |archive-url=https://web.archive.org/web/20100816210104/http://www.merriam-webster.com/mw/table/proofrea.htm |url-status=dead }} from [[Merriam Webster]]</ref> * Publishing: When submitting a science fiction manuscript for publication, a number sign on a line by itself (indented or centered) indicates a [[Section (typography)|section break]] in the text.<ref>{{cite web|url=http://www.sfwa.org/wp-content/uploads/2009/06/Mssprep.pdf|title=Manuscript Preparation|last=McIntyre|first=Vonda|date=October 2008|website=sfwa.org|publisher=Science Fiction & Fantasy Writers of America|access-date=28 May 2020|archive-date=3 October 2020|archive-url=https://web.archive.org/web/20201003095936/http://www.sfwa.org/wp-content/uploads/2009/06/Mssprep.pdf|url-status=live}}</ref> * [[Scrabble]]: Putting a number sign after a word indicates that the word is found in the British word lists, but not the [[Official Tournament and Club Word List|North American lists.]]<ref>{{cite web|url=http://www.tucsonscrabble.com/articles/glossary.html|title=Scrabble Glossary|publisher=Tucson Scrabble Club|access-date=2012-02-06|archive-url=https://web.archive.org/web/20110830073348/http://www.tucsonscrabble.com/articles/glossary.html|archive-date=2011-08-30|url-status=dead}}</ref> * [[Teletext]] and [[Digital Video Broadcasting|DVB]] [[subtitle]]s (in the UK and Ireland): The hash symbol, resembling music notation's sharp sign, is used to mark text that is either sung by a character or heard in background music, e.g. {{mono|''# For he's a jolly good fellow #''}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)