Difference between revisions of "Statement (computer science)"

From Wiki @ Karl Jones dot com
Jump to: navigation, search
(See also)
 
(3 intermediate revisions by the same user not shown)
Line 14: Line 14:
  
 
* [[Expressions]]
 
* [[Expressions]]
* [[TO DO: more examples]]
 
  
 
== Statements, definitions, and expressions ==
 
== Statements, definitions, and expressions ==
Line 33: Line 32:
 
* [[Computer program]]
 
* [[Computer program]]
 
* [[Computer programming]]
 
* [[Computer programming]]
 +
* [[Control flow]]
 +
* [[Extensible languages]]
 
* [[Imperative programming]]
 
* [[Imperative programming]]
 
* [[Programming language]]
 
* [[Programming language]]
Line 39: Line 40:
 
== External links ==  
 
== External links ==  
  
* [ ] @ Wikipedia
+
* [https://en.wikipedia.org/wiki/Statement_(computer_science) Statement (computer science)] @ Wikipedia
 +
 
 +
[[Category:Computer programming]]
 +
[[Category:Computer science]]
 +
[[Category:Software]]
 +
[[Category:Software development]]

Latest revision as of 13:19, 26 August 2016

In computer programming, a statement is the smallest standalone element of an imperative programming language that expresses some action to be carried out.

Description

A statement is an instruction written in a high-level programming language that commands the computer to perform a specified action.

Computer program

A program written in such a language is formed by a sequence of one or more statements.

Internal components of statements

A statement may have internal components

Statements, definitions, and expressions

Many languages (e.g. C) make a distinction between statements, definitions, and expressions:

  • A statement only containing executable code.
  • A definition declaring an identifier.
  • An expression evaluates to a value only.

Simple versus compound statements

A distinction can also be made between simple and compound statements, with compound statements contain multiple statements as components.

See also

External links