Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Asterisk
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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!
===Computing=== * In [[regular expression]]s, the asterisk is used to denote zero or more repetitions of a pattern; this use is also known as the ''[[Kleene star]]'' or ''Kleene closure'' after [[Stephen Kleene]]. * In [[Unified Modeling Language]], the asterisk is used to denote zero to many classes. * In some [[command line interface]]s, such as the [[Unix shell]] and [[Microsoft]]'s [[CMD (Windows)|CMD]], the asterisk is the ''[[wildcard character]]'' (or wildcard symbol) and stands for any [[string (computer science)|string]] of [[character (computing)|characters]]. A common use of the wildcard is in searching for files on a computer. For instance, if a user wished to find a document called <code>Document 1</code>, search terms such as <code>Doc*</code> and <code>D*ment*</code> would return this file. Due to being a wildcard, they could also return files like <code>Document 2</code> and (only the latter) <code>Dark Knight Monument.jpg</code>. <code>Document*</code> would in fact return any file that begins with <code>Document</code>, and <code>D*ment*</code> any file that began with D and had 'ment' somewhere in its name. * In some [[graphical user interface]]s, an asterisk is pre- or affixed to the current working document name shown in a window's title bar to indicate that unsaved changes exist. * In many computing and [[Internet]] applications, an asterisk is displayed in place of the characters of sensitive or confidential visible information, such as a password. * In [[Commodore International|Commodore]] (and related) [[file system]]s, an asterisk appearing next to a filename in a directory listing denotes an improperly closed file, commonly called a "splat file". * In travel industry [[Computer reservations system|Global Distribution Systems]], the asterisk is the display command to retrieve all or part of a [[Passenger Name Record]]. * In [[HTML]] [[web form]]s, a (usually red) asterisk can be used to denote required fields. * [[Chat room]] etiquette calls on one asterisk to correct a misspelled word or typo that has already been submitted. For example, one could post <code>lck</code>, then follow it with <code>*luck</code> or <code>luck*</code> (the placement of the * on the left or right is a matter of personal style) to correct the word's spelling, or if it's someone else that notices the mistake, they might also use <code>*luck</code> or <code>luck*</code>.<ref name=":0">{{cite journal |last1=Collister |first1=Lauren B. |date=2011-02-01 |title=*-repair in Online Discourse |url=http://d-scholarship.pitt.edu/20621/1/Star-Repair_in_Online_Discourse_-_Author_Accepted_Version.pdf |journal=Journal of Pragmatics |volume=43 |issue=3 |pages=918β921 |doi=10.1016/j.pragma.2010.09.025 |access-date=2018-05-31 |archive-date=2017-09-22 |archive-url=https://web.archive.org/web/20170922010832/http://d-scholarship.pitt.edu/20621/1/Star-Repair_in_Online_Discourse_-_Author_Accepted_Version.pdf |url-status=live }}</ref> This also applies to typos that result in a different word from the intended one but are correctly spelled. ** Enclosing a phrase between two asterisks is used to denote an action the user is "performing", e.g. <code>*pulls out a paper*</code>, although this usage is also common on forums, and less so on most chat rooms due to <code>/me</code> or similar commands. [[Hyphen]]s (<code>-action-</code>) and double [[colon (punctuation)|colons]] (<code>::action::</code>) as well as the operator <code>/me</code> are also used for similar purposes. * In [[Markdown]] and other markup languages, surrounding a set of characters or words in one asterisk italicizes, two asterisks bolds, and three asterisks both italicizes and bolds.<ref>{{Cite web |date=2024-04-16 |title=Markdown Guide - Basic Syntax: Emphasis |url=https://www.markdownguide.org/basic-syntax/#emphasis |url-status=live |archive-url=https://web.archive.org/web/20240413065626/https://www.markdownguide.org/basic-syntax/#emphasis |archive-date=2024-04-13 |access-date=2024-04-16 |website=Markdown Guide |language=en}}</ref> See the table below for examples of all three uses of the asterisk in Markdown, including how it translates to HTML and how it renders. {| class="wikitable" |- !Markdown |{{code|2=md|Italicized text is the *cat's meow*.}} |{{code|2=md|I just love **bold text**.}} |{{code|2=md|This text is ***really important***.}} |- !HTML |{{code|2=html|Italicized text is the <em>cat's meow</em>.}} |{{code|2=html|I just love <strong>bold text</strong>.}} |{{code|2=html|This text is <em><strong>really important</strong></em>.}} |- !Rendered Output |Italicized text is the ''cat's meow''. |I just love '''bold text'''. |This text is '''''really important'''''. |} ==== Adding machines and printing calculators ==== * Some models of [[adding machine]]s and [[calculator|printing calculators]] use the asterisk to denote the ''total'', or the terminal sum or difference of an addition or subtraction sequence, respectively. The symbol is sometimes given on the printout to indicate this total.{{citation needed|date=May 2020}} ====Programming languages==== Many [[programming language]]s and [[calculator]]s use the asterisk as a symbol for [[multiplication]]. It also has a number of special meanings in specific languages, for instance: * In some languages such as [[C (programming language)|C]], [[C++]], and [[Go (programming language)|Go]], the asterisk is used to [[dereference]] or declare a [[pointer (computer programming)|pointer]] variable. * In [[Common Lisp]], the names of [[global variable]]s are conventionally set off with asterisks, <code>*LIKE-THIS*</code>. * In the [[Ada (programming language)|Ada]], [[Fortran]], [[Perl]], [[Python (programming language)|Python]], [[Ruby (programming language)|Ruby]], some dialects of [[Pascal programming language|Pascal]], and many others, a double asterisk is used to signify [[exponentiation]]: <code>5**3</code> is 5<sup>3</sup> = 125. * In [[Perl]], the asterisk is used to refer to the ''[[typeglob]]'' of all variables with a given name. * In [[Ruby (programming language)|Ruby]] and [[Python (programming language)|Python]], the asterisk has two specific uses. First, the unary * operator applied to a list object inside a function call will expand that list into the positional arguments of the function call. Second, a parameter preceded by * {{anchor|args}}in the parameter list in a function definition will result in any extra positional parameters being aggregated into a [[tuple]] (Python) or [[array data type|array]] (Ruby), and likewise a parameter preceded by ** {{Anchor|kwargs}} will result in any extra [[named parameter|keyword parameters]] being aggregated into a [[associative array|dictionary]] (Python) or [[associative array|hash]] (Ruby): <syntaxhighlight lang="python">def function1(a, b, c, d): print(a, b, c, d) def function2(first, *args): # args will be a tuple # the name 'args' is convention: it may be any parameter name print(args) def function3(first, **kwargs): # kwargs will be a dict # the name 'kwargs' is convention: it may be any parameter name print(kwargs) function1(1, 2, 3, 4) # prints 1 2 3 4 function1(*[1, 2, 3, 4]) # prints 1 2 3 4 function1(**{"a": 5, "b": 6, "c": 7, "d": 8}) # prints 5 6 7 8 function2(1, 2, 3, 4) # prints (2, 3, 4), 1 is not part of args function2(99) # prints (), unfilled *parameter will be () function3(0, e=3, f=9) # prints {'e': 3, 'f': 9}, 0 is not part of kwargs function3(0) # prints {}, unfilled **parameter will be {}</syntaxhighlight> * In [[APL (programming language)|APL]], the asterisk represents the [[Exponential function|exponential]] and [[exponentiation]] functions, with <code>*X</code> representing <var>e</var><sup><var>X</var></sup>, and <code>Y*X</code> representing <var>Y</var><sup><var>X</var></sup>. * In IBM [[Job Control Language]], the asterisk has various functions, including in-stream data in the DD statement, the default print stream as <code>SYSOUT=*</code>, and as a self-reference in place of a procedure step name to refer to the same procedure step where it appears. * In [[Haskell (programming language)|Haskell]], the asterisk represents the set of well-formed, fully applied types; that is, a 0-ary ''kind'' of types. =====Comments in programming languages===== {{Main article|block comments}} In the [[B (programming language)|B programming language]] and languages that borrow syntax from it, such as [[C (programming language)|C]], [[PHP]], [[Java (software platform)|Java]], or [[C Sharp (programming language)|C#]], comments in the [[source code]] (for information to people, ignored by the [[compiler]]) are marked by an asterisk combined with the slash: <syntaxhighlight lang="c#"> /* This section displays message if user input was not valid (comment ignored by compiler) */ </syntaxhighlight> [[CSS]] also uses this comment format:<syntaxhighlight lang="css"> body { /* This ought to make the text more readable for far-sighted people */ font-size: 24pt; } </syntaxhighlight> Some [[Pascal (programming language)|Pascal]]-like programming languages, such as [[Object Pascal]], [[Modula-2]], [[Modula-3]], and [[Oberon (programming language)|Oberon]], and other languages such as [[ML (programming language)|ML]], [[Wolfram Language]] ([[Mathematica]]), [[AppleScript]], [[OCaml]], [[Standard ML]], and [[Maple (software)|Maple]], use an asterisk combined with a parenthesis: <syntaxhighlight lang="Applescript"> (* Do not change this variable - it is used later (comment ignored by compiler) *) </syntaxhighlight> Each computing language has its own way of handling comments; {{code|/* ... */}} and similar notations are not universal. ====History of information technology==== The asterisk was a supported symbol on the IBM 026 [[Keypunch]] (introduced in 1949 and used to create [[punch card]]s with data for early computer systems).<ref>{{Cite web|archive-url=https://web.archive.org/web/20110620214024if_/http://www.columbia.edu/cu/computinghistory/026.html |archive-date=20 June 2011 |title=the IBM 026 Key Punch |url=http://www.columbia.edu/cu/computinghistory/026.html |url-status=dead |publisher=Columbia University}}</ref> It was also included in the [[FIELDATA]] character encoding<ref>{{Cite web|url=https://nssdc.gsfc.nasa.gov/nssdc/formats/UnisysFieldata.htm|title="Univac Fieldata Codes"}}</ref> and the [[ASCII]] standard.<ref>{{Cite web |title=WPS:Projects:History of character codes:X3.4 1963 |url=https://www.sensitiveresearch.com/Archive/CharCodeHist/X3.4-1963/index.html |access-date=2023-11-18 |website=www.sensitiveresearch.com}}</ref><ref>{{Cite web|url=https://www.sensitiveresearch.com/Archive/CharCodeHist/X3.4-1963/page5.JPG|title=American Standard Code for Information Interchange (page 5)}}</ref><ref>{{Cite book |last=X3 |first=American Standards Association Sectional Committee on Computers and Information Processing |url=https://books.google.com/books?id=zXzEGwAACAAJ |title=American Standard Code for Information Interchange: Sponsor: Business Equipment Manufacturers Association. Approved June 17, 1963 |date=1963 |language=en}}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Asterisk
(section)
Add topic