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
Statement (computer science)
(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!
{{Short description|A section of code that details a specific command}} In [[computer programming]], a '''statement''' is a [[Syntax (programming languages)|syntactic]] unit of an [[Imperative programming|imperative programming language]] that expresses some action to be carried out.<ref>{{cite web | url = http://www.webopedia.com/TERM/S/statement.html | title = statement | date = September 1996 | publisher = webopedia | access-date = 2015-03-03}}</ref> A [[Computer program|program]] written in such a language is formed by a sequence of one or more statements. A statement may have internal components (e.g. [[Expression (computer science)|expressions]]). Many programming languages (e.g. [[Ada (programming language)|Ada]], [[Algol 60]], [[C (programming language)|C]], [[Java (programming language)|Java]], [[Pascal (programming language)|Pascal]]) make a distinction between statements and [[Declaration (computer programming)|definitions/declarations]]. A definition or declaration specifies the data on which a program is to operate, while a statement specifies the actions to be taken with that data. Statements which cannot contain other statements are ''simple''; those which can contain other statements are ''compound''.<ref name=ALGOL60>{{cite web|url=http://www.masswerk.at/algol60/report.htm |at=Section "4.1" |title=Revised Report on the Algorithmic Language Algol 60 |first1=J.W. |last1=Backus |first2=F.L. |last2=Bauer |first3=J. |last3=Green |first4=C. |last4=Katz |first5=J. |last5=McCarthy |first6=P. |last6=Naur |first7=A.J. |last7=Perlis |first8=H. |last8=Rutishauser |first9=K. |last9=Samuelson |first10=B. |last10=Vauquois |first11=J.H. |last11=Wegstein |first12=A. |last12=van Wijngaarden |first13=M. |last13=Woodger |editor-first1= Peter |editor-last1=Naur |website=mass:werk |access-date=January 23, 2021}}</ref> The appearance of a statement (and indeed a program) is determined by its [[Syntax (programming languages)|syntax]] or grammar. The meaning of a statement is determined by its [[Semantics (computer science)|semantics]].
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)