Content deleted Content added
Undid revision 1153528435 by 2600:1702:4FD1:4210:F5F2:648:9DCB:BBB0 (talk) since it appears to be a test edit (?) |
Tried to clear up some confusion when it comes to nomenclature |
||
Line 3:
{{other uses|Command (disambiguation)#Computing{{!}}Command#Computing}}
{{refimprove|date=May 2008 }}
In [[computing]], a '''command''' is a directive to a computer program to perform a specific task. It may be issued via a [[command-line interface]]
Specifically, the term ''command'' is used in [[imperative programming
Many programs allow
==Distinction between ''command'' and [[Expression_(computer_science)|expression]], [[Statement_(computer_science)|statement]] and [[Function_(computer_programming)|function]]==
The meaning of ''command'' is highly dependent on context. For example, some authors refer to [[Conditional_(computer_programming)|conditionals]] as commands <ref>Maurizio Gabbrielli, Simone Martini (2010). Programming Languages - Principles and Paradigms. Springer London, ''6.3.2 Conditional Commands'', p. 140</ref> while they are called ''expressions'' in Python<ref>{{cite web | url = https://docs.python.org/3/reference/expressions.html | access-date = 23 October 2023 | title = Conditional expressions | publisher = python.org }}</ref> or Bash<ref>{{cite web | url = https://www.gnu.org/software/bash/manual/html_node/Bash-Conditional-Expressions.html | access-date = 23 October 2023 | title = Bash Conditional expressions | publisher = gnu.org }}</ref> and ''statements'' in JAVA.<ref>{{cite web | url = https://docs.oracle.com/javase/tutorial/java/nutsandbolts/if.html | access-date = 23 October 2023 | title = The if-then and if-then-else Statements | publisher = oracle.com }}</ref>
Similarly, writing to [[Standard_streams#Standard_output_(stdout)|stdout]] is done in Bash with the builtin ''command'' [[Printf_(Unix)|printf]], while it is done with the built-in ''function'' print() in Python.<ref>{{cite web | url = https://docs.python.org/3/library/functions.html#print | access-date = 23 October 2023 | title = Built-in Functions - print | publisher = python.org }}</ref>
==Examples==
|